import { forwardRef } from "react"; import { useTheme } from "@mui/material/styles"; import { Box, Grid,Button } from "@mui/material"; import { CardLabel } from "./styles"; import React from 'react' interface CardProps { header?: React.ReactNode; children?: React.ReactNode; footer?: React.ReactNode variant?: "outlined", sx?: any, flip?: boolean, footerIcons?: React.ReactNode, backContent?: React.ReactNode } const Cardtheme = forwardRef( ({ variant = "outlined", header, children, sx, footer, flip = false, footerIcons, backContent, ...other }: CardProps, ref) => { const theme = useTheme(); const [rotate, setRotate] = React.useState(false) const [footerVisible, setFooterVisible] = React.useState(false) return ( { setFooterVisible(true) }} onMouseLeave={() => { setFooterVisible(false) }} sx={{ ...sx, }} {...other}> !flip ? () => { } : setRotate(!rotate)}> {header && {header}} {children && {children}} {footer && {footer}} {footerIcons && {footerIcons} } !flip ? () => { } : setRotate(!rotate)}> {backContent && {backContent}} ); } ); export default Cardtheme;