import * as React from 'react'; import PropTypes from 'prop-types'; import { useTheme } from '@mui/material/styles'; import useMediaQuery from '@mui/material/useMediaQuery'; import Button from '@mui/material/Button'; import { IconButton } from './style'; function ConditionalIconButton(props) { const { icon, ...buttonProps } = props; const theme = useTheme(); const matchSmallScreens = useMediaQuery(theme.breakpoints.down('md')); if (matchSmallScreens) { return ( {icon} ); } return