mirror of https://github.com/TZGyn/shortener
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
834 B
Svelte
27 lines
834 B
Svelte
<script lang="ts">
|
|
import { Select as SelectPrimitive } from 'bits-ui'
|
|
import { ChevronDown } from 'lucide-svelte'
|
|
import { cn } from '$lib/utils'
|
|
|
|
type $$Props = SelectPrimitive.TriggerProps
|
|
type $$Events = SelectPrimitive.TriggerEvents
|
|
|
|
let className: $$Props['class'] = undefined
|
|
export { className as class }
|
|
</script>
|
|
|
|
<SelectPrimitive.Trigger
|
|
class={cn(
|
|
'flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
|
|
className,
|
|
)}
|
|
{...$$restProps}
|
|
let:builder
|
|
on:click
|
|
on:keydown>
|
|
<slot {builder} />
|
|
<div>
|
|
<ChevronDown class="h-4 w-4 opacity-50" />
|
|
</div>
|
|
</SelectPrimitive.Trigger>
|