1<script lang="ts">
 2	import { cn } from '$lib/components/ui/utils';
 3	import type { Snippet } from 'svelte';
 4
 5	interface Props {
 6		children: Snippet;
 7		class?: string;
 8		icon?: Snippet;
 9		onclick?: () => void;
10	}
11
12	let { children, class: className = '', icon, onclick }: Props = $props();
13</script>
14
15<button
16	class={cn(
17		'inline-flex cursor-pointer items-center gap-1 rounded-sm bg-muted-foreground/15 px-1.5 py-0.75',
18		className
19	)}
20	{onclick}
21>
22	{#if icon}
23		{@render icon()}
24	{/if}
25
26	{@render children()}
27</button>