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.
25 lines
598 B
25 lines
598 B
import { Button as MUIButton, SxProps, Theme } from '@mui/material'; |
|
import { FC, useMemo } from 'react'; |
|
|
|
import { BLACK, GREY } from '../lib/consts/DEFAULT_THEME'; |
|
|
|
const ContainedButton: FC<ContainedButtonProps> = ({ sx, ...restProps }) => { |
|
const combinedSx = useMemo<SxProps<Theme>>( |
|
() => ({ |
|
backgroundColor: GREY, |
|
color: BLACK, |
|
textTransform: 'none', |
|
|
|
'&:hover': { |
|
backgroundColor: `${GREY}F0`, |
|
}, |
|
|
|
...sx, |
|
}), |
|
[sx], |
|
); |
|
|
|
return <MUIButton variant="contained" {...restProps} sx={combinedSx} />; |
|
}; |
|
|
|
export default ContainedButton;
|
|
|