import * as React from 'react'; import { alpha } from '@mui/material/styles'; import Box, { BoxProps } from '@mui/material/Box'; import Button from '@mui/material/Button'; import { Link } from '@mui/docs/Link'; import IconButton from '@mui/material/IconButton'; import KeyboardArrowUpRounded from '@mui/icons-material/KeyboardArrowUpRounded'; import KeyboardArrowDownRounded from '@mui/icons-material/KeyboardArrowDownRounded'; export function AppearingInfoBox({ appeared, children, ...props }: { appeared: boolean; children: React.ReactNode } & BoxProps) { const [hidden, setHidden] = React.useState(false); return ( alpha(palette.common.black, 0.9), borderTop: '1px solid', borderColor: hidden || !appeared ? 'transparent' : 'primaryDark.700', transform: hidden || !appeared ? 'translateY(100%)' : 'translateY(0)', transition: '0.2s', ...props.sx, }} > setHidden((bool) => !bool)} sx={{ position: 'absolute', zIndex: 2, transition: '0.3s', right: 16, bottom: '100%', transform: hidden || !appeared ? 'translateY(-10px)' : 'translateY(50%)', opacity: appeared ? 1 : 0, color: '#FFF', backgroundColor: 'primary.500', '&:hover': { backgroundColor: 'primary.800', }, }} > {hidden ? ( ) : ( )} {children} ); } export default function MoreInfoBox({ primaryBtnLabel, primaryBtnHref, secondaryBtnLabel, secondaryBtnHref, ...props }: { primaryBtnLabel: string; primaryBtnHref: string; secondaryBtnLabel: string; secondaryBtnHref: string; } & BoxProps) { return ( alpha(palette.primaryDark[800], 0.2), display: 'flex', flexDirection: { xs: 'column', sm: 'row' }, gap: { xs: 1.5, sm: 1 }, borderTop: '1px solid', borderColor: 'divider', zIndex: 3, ...props.sx, }} > ); }