We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afe282f commit 2bce8d4Copy full SHA for 2bce8d4
docs/src/lib/registry/ui/command/command.svelte
@@ -1,16 +1,22 @@
1
<script lang="ts">
2
- import { Command as CommandPrimitive } from "bits-ui";
3
import { cn } from "$lib/utils.js";
+ import { Command as CommandPrimitive } from "bits-ui";
4
+
5
+ export type CommandRootApi = CommandPrimitive.Root;
6
7
let {
8
+ api = $bindable(null),
9
ref = $bindable(null),
10
value = $bindable(""),
11
class: className,
12
...restProps
- }: CommandPrimitive.RootProps = $props();
13
+ }: CommandPrimitive.RootProps & {
14
+ api?: CommandRootApi | null;
15
+ } = $props();
16
</script>
17
18
<CommandPrimitive.Root
19
+ bind:this={api}
20
bind:value
21
bind:ref
22
data-slot="command"
0 commit comments