fix(striker-ui): add play preset to IconButton

main
Tsu-ba-me 2 years ago
parent 6aaa4f6237
commit f72a348fb5
  1. 6
      striker-ui/components/IconButton/IconButton.tsx
  2. 1
      striker-ui/types/IconButton.d.ts

@ -3,6 +3,7 @@ import {
Close as MUICloseIcon,
Done as MUIDoneIcon,
Edit as MUIEditIcon,
PlayCircle as MUIPlayCircleIcon,
Visibility as MUIVisibilityIcon,
VisibilityOff as MUIVisibilityOffIcon,
} from '@mui/icons-material';
@ -55,6 +56,10 @@ const MAP_TO_EDIT_ICON: IconButtonMapToStateIconBundle = {
true: { iconType: MUIDoneIcon, iconProps: { sx: { color: BLUE } } },
};
const MAP_TO_PLAY_ICON: IconButtonMapToStateIconBundle = {
none: { iconType: MUIPlayCircleIcon },
};
const MAP_TO_VISIBILITY_ICON: IconButtonMapToStateIconBundle = {
false: { iconType: MUIVisibilityIcon },
true: { iconType: MUIVisibilityOffIcon },
@ -67,6 +72,7 @@ const MAP_TO_MAP_PRESET: Record<
add: MAP_TO_ADD_ICON,
close: MAP_TO_CLOSE_ICON,
edit: MAP_TO_EDIT_ICON,
play: MAP_TO_PLAY_ICON,
visibility: MAP_TO_VISIBILITY_ICON,
};

@ -4,6 +4,7 @@ type IconButtonPresetMapToStateIconBundle =
| 'add'
| 'close'
| 'edit'
| 'play'
| 'visibility';
type IconButtonStateIconBundle = {

Loading…
Cancel
Save