import * as React from 'react';
import PropTypes from 'prop-types';
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';
function TabPanel(props) {
const { children, value, index, ...other } = props;
return (
{value === index && {children}}
);
}
TabPanel.propTypes = {
children: PropTypes.node,
index: PropTypes.number.isRequired,
value: PropTypes.number.isRequired,
};
function a11yProps(index) {
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, newValue) => {
setValue(newValue);
};
const transitionDuration = {
enter: theme.transitions.duration.enteringScreen,
exit: theme.transitions.duration.leavingScreen,
};
const fabs = [
{
color: 'primary',
sx: fabStyle,
icon: ,
label: 'Add',
},
{
color: 'secondary',
sx: fabStyle,
icon: ,
label: 'Edit',
},
{
color: 'inherit',
sx: { ...fabStyle, ...fabGreenStyle },
icon: ,
label: 'Expand',
},
];
return (
Item One
Item Two
Item Three
{fabs.map((fab, index) => (
{fab.icon}
))}
);
}