import type { ReactNode } from "react"; /** * Line icons drawn with `currentColor`: they take the text colour of their * context, so every theme colours them (no per-theme icon sets needed). */ const P: Record = { menu: , close: , check: , "x-mark": , "arrow-up": , "arrow-down": , "arrow-left": , "arrow-right": , "chevron-right": , "chevron-down": , share: ( <> ), fork: ( <> ), download: , compact: , trash: , gamepad: ( <> ), computer: ( <> ), food: ( <> ), home: ( <> ), book: ( <> ), code: , camera: ( <> ), cart: ( <> ), heart: , star: , globe: ( <> ), calendar: ( <> ), coffee: ( <> ), car: ( <> ), plane: ( <> ), bulb: , money: ( <> ), palette: ( <> ), reply: , edit: , undo: , clip: , file: ( <> ), "file-text": ( <> ), "file-doc": ( <> ), folder: , "folder-up": ( <> ), folders: ( <> ), image: ( <> ), music: ( <> ), cube: ( <> ), external: , refresh: , lock: ( <> ), question: ( <> ), "radio-on": ( <> ), "radio-off": , "box-on": ( <> ), "box-off": , play: , stop: , warning: , brain: ( <> ), search: ( <> ), eye: ( <> ), gear: ( <> ), robot: ( <> ), plug: , shield: ( <> ), users: ( <> ), user: ( <> ), toolbox: ( <> ), scroll: , terminal: ( <> ), logout: , chart: , wrench: , sun: ( <> ), moon: , "theme-auto": ( <> ), dot: , plus: , pin: , archive: , template: , mic: ( <> ), clock: ( <> ), minus: , upload: , more: ( <> ), copy: ( <> ), sparkle: , }; export type IconName = keyof typeof P; export function Icon({ name, size, className, title }: { name: string; size?: number; className?: string; title?: string }) { return ( {title && {title}} {P[name] ?? P.dot} ); }