({
title = "Command Palette",
description = "Search for a command to run...",
children,
...props
}: React.ComponentProps<typeof Dialog> & {
title?: string;
description?: string;
})
| 29 | } |
| 30 | |
| 31 | function CommandDialog({ |
| 32 | title = "Command Palette", |
| 33 | description = "Search for a command to run...", |
| 34 | children, |
| 35 | ...props |
| 36 | }: React.ComponentProps<typeof Dialog> & { |
| 37 | title?: string; |
| 38 | description?: string; |
| 39 | }) { |
| 40 | return ( |
| 41 | <Dialog {...props}> |
| 42 | <DialogHeader className="sr-only"> |
| 43 | <DialogTitle>{title}</DialogTitle> |
| 44 | <DialogDescription>{description}</DialogDescription> |
| 45 | </DialogHeader> |
| 46 | <DialogContent className="overflow-hidden p-0 sm:max-w-lg [&>button:last-child]:hidden"> |
| 47 | <Command className="max-h-[100svh] **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2"> |
| 48 | {children} |
| 49 | </Command> |
| 50 | </DialogContent> |
| 51 | </Dialog> |
| 52 | ); |
| 53 | } |
| 54 | |
| 55 | function CommandInput({ |
| 56 | className, |
nothing calls this directly
no outgoing calls
no test coverage detected