import * as React from 'react'; import { useTheme } from '@mui/material/styles'; import AppBar from '@mui/material/AppBar'; import Tabs from '@mui/material/Tabs'; import Tab from '@mui/material/Tab'; import Typography from '@mui/material/Typography'; import Zoom from '@mui/material/Zoom'; import Fab from '@mui/material/Fab'; import AddIcon from '@mui/icons-material/Add'; import EditIcon from '@mui/icons-material/Edit'; import UpIcon from '@mui/icons-material/KeyboardArrowUp'; import { green } from '@mui/material/colors'; import Box from '@mui/material/Box'; import { SxProps } from '@mui/system'; interface TabPanelProps { children?: React.ReactNode; dir?: string; index: number; value: number; } function TabPanel(props: TabPanelProps) { const { children, value, index, ...other } = props; return ( ); } function a11yProps(index: any) { return { id: `action-tab-${index}`, 'aria-controls': `action-tabpanel-${index}`, }; } const fabStyle = { position: 'absolute', bottom: 16, right: 16, }; const fabGreenStyle = { color: 'common.white', bgcolor: green[500], '&:hover': { bgcolor: green[600], }, }; export default function FloatingActionButtonZoom() { const theme = useTheme(); const [value, setValue] = React.useState(0); const handleChange = (event: unknown, newValue: number) => { setValue(newValue); }; const transitionDuration = { enter: theme.transitions.duration.enteringScreen, exit: theme.transitions.duration.leavingScreen, }; const fabs = [ { color: 'primary' as const, sx: fabStyle as SxProps, icon: , label: 'Add', }, { color: 'secondary' as const, sx: fabStyle as SxProps, icon: , label: 'Edit', }, { color: 'inherit' as const, sx: { ...fabStyle, ...fabGreenStyle } as SxProps, icon: , label: 'Expand', }, ]; return ( Item One Item Two Item Three {fabs.map((fab, index) => ( {fab.icon} ))} ); }