Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { FC } from 'react';
|
|
|
|
import {
|
|
|
|
IconButton as MUIIconButton,
|
|
|
|
IconButtonProps as MUIIconButtonProps,
|
|
|
|
} from '@mui/material';
|
|
|
|
|
|
|
|
import {
|
|
|
|
BLACK,
|
|
|
|
BORDER_RADIUS,
|
|
|
|
GREY,
|
|
|
|
TEXT,
|
|
|
|
} from '../../lib/consts/DEFAULT_THEME';
|
|
|
|
|
|
|
|
export type IconButtonProps = MUIIconButtonProps;
|
|
|
|
|
|
|
|
const IconButton: FC<IconButtonProps> = ({
|
|
|
|
children,
|
|
|
|
sx,
|
|
|
|
...iconButtonRestProps
|
|
|
|
}) => (
|
|
|
|
<MUIIconButton
|
|
|
|
{...{
|
|
|
|
...iconButtonRestProps,
|
|
|
|
sx: {
|
|
|
|
borderRadius: BORDER_RADIUS,
|
|
|
|
backgroundColor: GREY,
|
|
|
|
color: BLACK,
|
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
backgroundColor: TEXT,
|
|
|
|
},
|
|
|
|
|
|
|
|
...sx,
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</MUIIconButton>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default IconButton;
|