feat: add annotations, user profiles, watchers, stories, search and more
This commit is contained in:
1 parent
ed469ba8dd
commit
2465bcd184
47 files changed
+5009
-242
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<script lang="ts">
|
||||
import { ContextMenu } from "bits-ui";
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
interface Props {
|
||||
children: Snippet<[{ props: Record<string, unknown> }]>;
|
||||
menu: Snippet;
|
||||
}
|
||||
|
||||
const { children, menu }: Props = $props();
|
||||
</script>
|
||||
|
||||
<ContextMenu.Root>
|
||||
<ContextMenu.Trigger>
|
||||
{#snippet child({ props })}
|
||||
{@render children({ props })}
|
||||
{/snippet}
|
||||
</ContextMenu.Trigger>
|
||||
<ContextMenu.Portal>
|
||||
<ContextMenu.Content class="bg-menu-content">
|
||||
{@render menu()}
|
||||
</ContextMenu.Content>
|
||||
</ContextMenu.Portal>
|
||||
</ContextMenu.Root>
|
||||
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
import { ContextMenu } from "bits-ui";
|
||||
import type { Snippet } from "svelte";
|
||||
import Icon from "./Icon.svelte";
|
||||
|
||||
interface Props {
|
||||
children: Snippet;
|
||||
icon?: string;
|
||||
onselect: () => void;
|
||||
}
|
||||
|
||||
const { icon, onselect, children }: Props = $props();
|
||||
</script>
|
||||
|
||||
<ContextMenu.Item class="bg-menu-item" onSelect={onselect}>
|
||||
{#if icon}
|
||||
<Icon name={icon} size="1.125rem" />
|
||||
{/if}
|
||||
{@render children()}
|
||||
</ContextMenu.Item>
|
||||
Reference in new issue
Block a user