carta/docs/src/lib/components/ui/command/command-input.svelte
2023-11-19 15:04:06 +01:00

23 lines
727 B
Svelte

<script lang="ts">
import { Command as CommandPrimitive } from 'cmdk-sv';
import { MagnifyingGlass } from 'radix-icons-svelte';
import { cn } from '$lib/utils';
// type $$Props = CommandPrimitive.InputProps;
let className: string | undefined | null = undefined;
export let value = '';
export { className as class };
</script>
<div class="flex items-center border-b px-3" data-cmdk-input-wrapper="">
<MagnifyingGlass class="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
bind:value
class={cn(
'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',
className
)}
{...$$restProps}
/>
</div>