anvil/striker-ui/types/IconButton.d.ts

32 lines
844 B
TypeScript
Raw Normal View History

type CreatableComponent = Parameters<typeof import('react').createElement>[0];
type IconButtonPresetMapToStateIconBundle =
| 'add'
| 'close'
2024-04-05 23:36:59 +00:00
| 'copy'
| 'delete'
| 'edit'
| 'play'
| 'visibility';
type IconButtonStateIconBundle = {
iconType: CreatableComponent;
iconProps?: import('@mui/material').SvgIconProps;
};
type IconButtonMapToStateIconBundle = Record<string, IconButtonStateIconBundle>;
type IconButtonVariant = 'contained' | 'normal' | 'redcontained';
type IconButtonMouseEventHandler =
import('@mui/material').IconButtonProps['onClick'];
type IconButtonOptionalProps = {
defaultIcon?: CreatableComponent;
iconProps?: import('@mui/material').SvgIconProps;
mapPreset?: IconButtonPresetMapToStateIconBundle;
mapToIcon?: IconButtonMapToStateIconBundle;
state?: string;
variant?: IconButtonVariant;
};