default Alova v2

This commit is contained in:
proddy
2024-08-10 10:22:14 +02:00
parent efa9718081
commit bb98042957
38 changed files with 574 additions and 287 deletions

View File

@@ -30,11 +30,13 @@ const OPTION_ICONS: {
favorite: [StarIcon, StarOutlineIcon]
};
export default function OptionIcon({ type, isSet }) {
const OptionIcon = ({ type, isSet }: { type: OptionType; isSet: boolean }) => {
const Icon = OPTION_ICONS[type][isSet ? 0 : 1];
return isSet ? (
<Icon color="primary" sx={{ fontSize: 16, verticalAlign: 'middle' }} />
) : (
<Icon sx={{ fontSize: 16, verticalAlign: 'middle' }} />
);
}
};
export default OptionIcon;