import { useTheme } from '@mui/material'; import type { DrawerProps } from '@mui/material'; import { Divider, Drawer, Portal } from '@mui/material'; import type { FC, PropsWithChildren } from 'react'; import React, { Fragment } from 'react'; import { useIsSmallScreen } from '../../core/components/hooks'; const darkBlack = 'rgba(0, 0, 0, 0.87)'; const bright = 'rgba(255,255,255, 0.98)'; const brightBorder = 'rgba(0, 0, 0, 0.12)'; export type BottomToolbarDrawerProps = { open: boolean; style?: React.CSSProperties; className?: string; anchor?: DrawerProps['anchor']; dark?: boolean; scale?: number; }; export const BottomToolbarDrawer: FC< PropsWithChildren > = ({ className, anchor, open, scale = 1, children, style = {} }) => { const divider = ( ); const theChildren = React.Children.toArray(children).filter(Boolean); const isSmall = useIsSmallScreen(); const theme = useTheme(); const dark = theme.palette.mode === 'dark'; return (
{theChildren.map((child, index) => ( {child} {index < theChildren.length - 1 ? divider : null} ))}
); };