| 1 | "use client"; |
| 2 | |
| 3 | import { basicBlockItems, type PaletteItem } from "./elements"; |
| 4 | import { PaletteItemsPanel } from "./ElementsPanel"; |
| 5 | |
| 6 | function getBasicBlockFilterValue(item: PaletteItem): string { |
| 7 | return item.category ?? "Basic blocks"; |
| 8 | } |
| 9 | |
| 10 | export function BasicBlocksPanel({ isLoaded }: { isLoaded: boolean }) { |
| 11 | return ( |
| 12 | <PaletteItemsPanel |
| 13 | emptyMessage="No basic blocks match your search." |
| 14 | getFilterValue={getBasicBlockFilterValue} |
| 15 | isLoaded={isLoaded} |
| 16 | paletteItems={basicBlockItems} |
| 17 | searchPlaceholder="Search basic blocks..." |
| 18 | source="basicBlocks" |
| 19 | /> |
| 20 | ); |
| 21 | } |
| 22 |