import { m } from 'framer-motion'; import { forwardRef, ReactNode } from 'react'; // @mui import { useTheme } from '@mui/material/styles'; import { Box, Fab, FabProps, SxProps } from '@mui/material'; // ---------------------------------------------------------------------- interface Props extends Omit { sxWrap?: SxProps; color?: | 'inherit' | 'default' | 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'; } const FabButtonAnimate = forwardRef( ({ color = 'primary', size = 'large', children, sx, sxWrap, ...other }, ref) => { const theme = useTheme(); if ( color === 'default' || color === 'inherit' || color === 'primary' || color === 'secondary' ) { return ( {children} ); } return ( {children} ); } ); export default FabButtonAnimate; // ---------------------------------------------------------------------- type AnimateWrapProp = { children: ReactNode; size: 'small' | 'medium' | 'large'; sxWrap?: SxProps; }; const varSmall = { hover: { scale: 1.07 }, tap: { scale: 0.97 }, }; const varMedium = { hover: { scale: 1.06 }, tap: { scale: 0.98 }, }; const varLarge = { hover: { scale: 1.05 }, tap: { scale: 0.99 }, }; function AnimateWrap({ size, children, sxWrap }: AnimateWrapProp) { const isSmall = size === 'small'; const isLarge = size === 'large'; return ( {children} ); }