feat: file uploads
This commit is contained in:
29
client/src/lib/ui/Button.svelte
Normal file
29
client/src/lib/ui/Button.svelte
Normal file
@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
import { Button } from 'bits-ui';
|
||||
import { cn } from '$lib/utils';
|
||||
import type { MouseEventHandler } from 'svelte/elements';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
let {
|
||||
className,
|
||||
type,
|
||||
onclick,
|
||||
children
|
||||
}: {
|
||||
className?: string;
|
||||
type?: 'submit' | 'reset' | 'button' | null;
|
||||
onclick?: () => MouseEventHandler<HTMLButtonElement> | null | undefined;
|
||||
children?: Snippet<[]>;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<Button.Root
|
||||
{type}
|
||||
class={cn(
|
||||
'bg-sky text-crust hover:brightness-120 w-fit cursor-pointer rounded p-2 px-4 text-sm font-medium transition-all',
|
||||
className
|
||||
)}
|
||||
{onclick}
|
||||
>
|
||||
{@render children?.()}
|
||||
</Button.Root>
|
@ -7,7 +7,7 @@
|
||||
trigger,
|
||||
content,
|
||||
open = $bindable(false)
|
||||
}: { trigger: Snippet; content: Snippet; open: boolean } = $props();
|
||||
}: { trigger: Snippet; content: Snippet; open?: boolean } = $props();
|
||||
</script>
|
||||
|
||||
<Dialog.Root bind:open>
|
||||
|
Reference in New Issue
Block a user