39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
|
|
import SpeedDial from '@mui/material/SpeedDial';
|
|
import SpeedDialIcon from '@mui/material/SpeedDialIcon';
|
|
import SpeedDialAction from '@mui/material/SpeedDialAction';
|
|
import FileCopyIcon from '@mui/icons-material/FileCopyOutlined';
|
|
import SaveIcon from '@mui/icons-material/Save';
|
|
import PrintIcon from '@mui/icons-material/Print';
|
|
import ShareIcon from '@mui/icons-material/Share';
|
|
import { Box } from '@mui/material';
|
|
|
|
|
|
const actions = [
|
|
{ icon: <FileCopyIcon />, name: 'Copy' },
|
|
{ icon: <SaveIcon />, name: 'Save' },
|
|
{ icon: <PrintIcon />, name: 'Print' },
|
|
{ icon: <ShareIcon />, name: 'Share' },
|
|
];
|
|
|
|
const BottomRightDial = () => {
|
|
return (
|
|
<Box sx={{ position: 'fixed', bottom: 16, right: 16, zIndex: 1000 }}>
|
|
<SpeedDial
|
|
ariaLabel="SpeedDial basic example"
|
|
sx={{ position: 'absolute', bottom: 16, right: 16 }}
|
|
FabProps={{ sx: { backgroundColor: 'cornflowerblue' } }}
|
|
icon={<SpeedDialIcon />}
|
|
>
|
|
{actions.map((action) => (
|
|
<SpeedDialAction
|
|
key={action.name}
|
|
icon={action.icon}
|
|
tooltipTitle={action.name}
|
|
/>
|
|
))}
|
|
</SpeedDial>
|
|
</Box>
|
|
);
|
|
}
|
|
export default BottomRightDial; |