20 lines
522 B
Svelte
20 lines
522 B
Svelte
<script>
|
|||
|
|
import { Select } from 'bits-ui';
|
||
|
|
import { cn } from '$lib/utils/cn.js';
|
||
|
|
|
||
|
|
let { ref = $bindable(null), class: className, sideOffset = 4, children, ...restProps } = $props();
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<Select.Portal>
|
||
|
|
<Select.Content
|
||
|
|
bind:ref
|
||
|
|
{sideOffset}
|
||
|
|
class={cn(
|
||
|
|
'z-50 max-h-72 w-[var(--bits-select-anchor-width)] overflow-y-auto rounded-md border border-border bg-surface p-1 shadow-lg',
|
||
|
|
className,
|
||
|
|
)}
|
||
|
|
{...restProps}
|
||
|
|
>
|
||
|
|
{@render children?.()}
|
||
|
|
</Select.Content>
|
||
|
|
</Select.Portal>
|