You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
394 B
TypeScript
20 lines
394 B
TypeScript
// frontend/components/Chip.tsx
|
|
import { Icon } from "./Icon";
|
|
import type { IconName } from "./icons/paths";
|
|
export function Chip({
|
|
icon,
|
|
children,
|
|
onClick,
|
|
}: {
|
|
icon?: IconName;
|
|
children: React.ReactNode;
|
|
onClick?: () => void;
|
|
}) {
|
|
return (
|
|
<button className="chip" onClick={onClick} type="button">
|
|
{icon && <Icon name={icon} />}
|
|
{children}
|
|
</button>
|
|
);
|
|
}
|