Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 84x 252x 731x | import { CommandBinding } from "just-search-it";
import {
Tabs,
TabsContent,
TabsList,
TabsTrigger,
} from "../ahuora-design-system/ui/tabs";
import { CommandButton } from "./CommandButton";
export function GroupTabs({
commands,
}: {
commands: Record<string, CommandBinding<any>[]>;
}) {
return (
<div>
{Object.entries(commands).map(([group, commandList]) => (
<div key={group} className="py-5">
<h1>{group}</h1>
<div className="grid grid-cols-3 gap-2 pt-2">
{commandList.map((command) => (
<CommandButton
key={command.metadata.name}
commandBinding={command}
/>
))}
</div>
</div>
))}
</div>
);
}
|