Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import Box from '@mui/material/Box';
|
|
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';
|
|
|
|
const actions = [
|
|
{ icon: <FileCopyIcon />, name: 'Copy' },
|
|
{ icon: <SaveIcon />, name: 'Save' },
|
|
{ icon: <PrintIcon />, name: 'Print' },
|
|
{ icon: <ShareIcon />, name: 'Share' },
|
|
];
|
|
|
|
export default function BasicSpeedDial() {
|
|
return (
|
|
<Box sx={{ height: 320, transform: 'translateZ(0px)', flexGrow: 1 }}>
|
|
<SpeedDial
|
|
ariaLabel="SpeedDial basic example"
|
|
sx={{ position: 'absolute', bottom: 16, right: 16 }}
|
|
icon={<SpeedDialIcon />}
|
|
>
|
|
{actions.map((action) => (
|
|
<SpeedDialAction
|
|
key={action.name}
|
|
icon={action.icon}
|
|
slotProps={{
|
|
tooltip: {
|
|
title: action.name,
|
|
},
|
|
}}
|
|
/>
|
|
))}
|
|
</SpeedDial>
|
|
</Box>
|
|
);
|
|
}
|