diff --git a/.changeset/bright-kangaroos-explode.md b/.changeset/bright-kangaroos-explode.md new file mode 100644 index 0000000..0454cb4 --- /dev/null +++ b/.changeset/bright-kangaroos-explode.md @@ -0,0 +1,5 @@ +--- +'cmdk-sv': patch +--- + +fix: move Command additional props to types file diff --git a/src/lib/cmdk/components/Command.svelte b/src/lib/cmdk/components/Command.svelte index 3c9449f..a650367 100644 --- a/src/lib/cmdk/components/Command.svelte +++ b/src/lib/cmdk/components/Command.svelte @@ -8,10 +8,7 @@ import { createCommand } from '../command.js'; import type { CommandProps } from '../types.js'; - type $$Props = CommandProps & { - onKeydown?: (e: KeyboardEvent) => void; - asChild?: boolean; - }; + type $$Props = CommandProps; export let label: $$Props['label'] = undefined; export let shouldFilter: $$Props['shouldFilter'] = true; diff --git a/src/lib/cmdk/types.ts b/src/lib/cmdk/types.ts index ea5225e..f99f920 100644 --- a/src/lib/cmdk/types.ts +++ b/src/lib/cmdk/types.ts @@ -102,7 +102,10 @@ export type CommandProps = Expand< ids?: Partial; } > & - HTMLDivAttributes; + HTMLDivAttributes & { + onKeydown?: (e: KeyboardEvent) => void; + asChild?: boolean; + }; export type ListProps = { /**