fix: use correct icon in ConditionalIconButton

This commit is contained in:
Ali BARIN
2021-12-14 12:42:23 +01:00
committed by Ömer Faruk Aydın
parent 6da8557219
commit fdfad28c2e
2 changed files with 21 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ import Button from '@mui/material/Button';
import { IconButton } from './style';
export default function ConditionalIconButton(props: any) {
const { Icon, ...buttonProps } = props;
const { icon, ...buttonProps } = props;
const theme = useTheme();
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('md'), { noSsr: true });
@@ -17,9 +17,8 @@ export default function ConditionalIconButton(props: any) {
type={buttonProps.type}
size={buttonProps.size}
component={buttonProps.component}
to={buttonProps.to}
>
<Icon />
{icon}
</IconButton>
)
}