Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
1.2 kB ยท 48 lines
TSX
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849"use client";
import { CommandGroup, CommandItem,} from "@openstatus/ui/components/ui/command";
import type { CommandAction, CommandMenuGroup } from "./types";
export function GroupView({ group, search, onAction,}: { group: CommandMenuGroup; search: string; onAction: (action: CommandAction) => void;}) { if (group.items.length === 0) return null; const items = !search && group.idleLimit ? group.items.slice(0, group.idleLimit) : group.items; return ( <CommandGroup heading={group.heading}> {items.map((item) => ( <CommandItem key={item.value} value={item.value} keywords={item.keywords} onSelect={() => onAction(item.action)} > {item.icon ? <item.icon /> : null} {item.description ? ( <div className="grid min-w-0"> <span className="truncate">{item.label}</span> <span className="text-muted-foreground font-commit-mono truncate text-xs"> {item.description} </span> </div> ) : ( <span>{item.label}</span> )} </CommandItem> ))} </CommandGroup> );}