import { Colors } from "../../../application/enums/shared/Colors"; import { getColors } from "../../../utils/shared/ColorUtils"; import ColorBadge from "../badges/ColorBadge"; import InputSelector from "./InputSelector"; import { useApp } from "../../../hooks"; interface Props { name?: string; title?: string; value?: string | number | undefined; setValue?: React.Dispatch>; className?: string; withColorNames?: boolean; withSearch?: boolean; selectPlaceholder?: string; required?: boolean; } export default function InputColorSelector({ name, title, value, setValue, className, withColorNames = true, withSearch = false, selectPlaceholder, required, }: Props) { const { t } = useApp(); return ( { return { name: (
{withColorNames &&
{t("app.shared.colors." + Colors[color])}
}
), value: color, }; }) ?? [] } >
); }