2024-08-23 00:25:53 +00:00
|
|
|
<script lang="ts">
|
2024-08-26 21:43:43 +00:00
|
|
|
import cx from "classnames"
|
|
|
|
|
import type {NodeViewProps} from "@tiptap/core"
|
|
|
|
|
import {NodeViewWrapper} from "svelte-tiptap"
|
|
|
|
|
import Link from "@lib/components/Link.svelte"
|
2024-08-23 00:25:53 +00:00
|
|
|
|
2024-08-26 21:43:43 +00:00
|
|
|
export let node: NodeViewProps["node"]
|
|
|
|
|
export let selected: NodeViewProps["selected"]
|
2024-08-23 00:25:53 +00:00
|
|
|
</script>
|
|
|
|
|
|
2024-08-23 20:33:36 +00:00
|
|
|
<NodeViewWrapper class="inline">
|
2024-08-26 21:43:43 +00:00
|
|
|
<Link
|
|
|
|
|
external
|
|
|
|
|
href="https://coracle.social/topics/{node.attrs.name.toLowerCase()}"
|
|
|
|
|
class={cx("link-content", {"link-content-selected": selected})}>
|
2024-08-23 20:33:36 +00:00
|
|
|
#{node.attrs.name}
|
|
|
|
|
</Link>
|
2024-08-23 00:25:53 +00:00
|
|
|
</NodeViewWrapper>
|