import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp' import { IconButton, Fade, SxProps, Theme } from '@mui/material' interface Props { onClick: () => void show: boolean sx?: SxProps } export const ScrollTopButton = ({ onClick, show, sx }: Props) => { return ( theme.palette.mode === 'dark' ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)', '&:hover': { backgroundColor: (theme) => theme.palette.mode === 'dark' ? 'rgba(255,255,255,0.2)' : 'rgba(0,0,0,0.2)', }, visibility: show ? 'visible' : 'hidden', ...sx, }} > ) }