mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-24 16:01:42 +00:00
dd63dac840
This reverts commit 38ba77db06.
19 lines
530 B
Svelte
19 lines
530 B
Svelte
<script lang="ts">
|
|
interface Props {
|
|
color?: 'light' | 'dark' | undefined;
|
|
border?: boolean;
|
|
children?: import('svelte').Snippet;
|
|
}
|
|
|
|
let { color = 'light', border = false, children }: Props = $props();
|
|
|
|
let colorClasses = $derived({
|
|
light: 'text-primary bg-surface hover:bg-surface-hover text-primary',
|
|
dark: 'text-primary hover:bg-surface-hover-dark text-primary'
|
|
}[color ?? 'light'])
|
|
</script>
|
|
|
|
<div class="rounded-full p-1 {colorClasses} {border ? 'border border-tertiary' : ''}">
|
|
{@render children?.()}
|
|
</div>
|