Files
flotilla/src/app/components/GroupComposeLink.svelte
T
2024-08-20 13:20:45 -07:00

20 lines
666 B
Svelte

<script lang="ts">
import cx from 'classnames'
import type {NodeViewProps} from '@tiptap/core'
import {NodeViewWrapper} from 'svelte-tiptap'
import {displayUrl} from '@welshman/lib'
import Icon from '@lib/components/Icon.svelte'
import Link from '@lib/components/Link.svelte'
export let node: NodeViewProps['node']
export let selected: NodeViewProps['selected']
</script>
<NodeViewWrapper class="inline">
<Link external href={node.attrs.url} class={cx("link-content", {'link-content-selected': selected})}>
<Icon icon="link-round" size={3} class="inline-block translate-y-px" />
{displayUrl(node.attrs.url)}
</Link>
</NodeViewWrapper>