Support copying and pasting npubs better

This commit is contained in:
Jon Staab
2025-05-29 14:30:22 -07:00
parent 5338ee11bc
commit 962ac7d80c
8 changed files with 72 additions and 55 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
import {throttle, clamp} from "@welshman/lib"
import {preventDefault, stopPropagation} from "@lib/html"
const {term, search, select, component: Component, allowCreate = false} = $props()
const {term, search, select, component: Component, style = "", allowCreate = false} = $props()
let index = $state(0)
let items: string[] = $state([])
@@ -57,7 +57,7 @@
})
</script>
<div transition:fly|local={{duration: 200}} class="tiptap-suggestions">
<div transition:fly|local={{duration: 200}} class="tiptap-suggestions" {style}>
<div class="tiptap-suggestions__content max-h-[40vh]">
{#if $term && allowCreate && !items.includes($term)}
<button