import { Button, Group, Stack, Text } from "@mantine/core"; import FitText from "./FitText"; export interface ButtonOption { value: T; label: string; disabled?: boolean; } interface ButtonSelectorProps { value: T | undefined; onChange: (value: T) => void; options: ButtonOption[]; label?: string; disabled?: boolean; fullWidth?: boolean; buttonClassName?: string; textClassName?: string; } const ButtonSelector = ({ value, onChange, options, label = undefined, disabled = false, fullWidth = true, buttonClassName, textClassName, }: ButtonSelectorProps) => { return ( {/* Label (if it exists) */} {label && {label}} {/* Buttons */} {options.map((option) => ( ))} ); }; export default ButtonSelector;