MCPcopy Create free account
hub / github.com/cosscom/coss / CommandDialog

Function CommandDialog

apps/origin/registry/default/ui/command.tsx:31–53  ·  view source on GitHub ↗
({
  title = "Command Palette",
  description = "Search for a command to run...",
  children,
  ...props
}: React.ComponentProps<typeof Dialog> & {
  title?: string;
  description?: string;
})

Source from the content-addressed store, hash-verified

29}
30
31function 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
55function CommandInput({
56 className,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected