// @mui import { styled, alpha } from '@mui/material/styles'; import { Grid, RadioGroup, CardActionArea, Box, Stack } from '@mui/material'; // hooks import useSettings from '../../hooks/useSettings'; // import { BoxMask } from '.'; // ---------------------------------------------------------------------- const BoxStyle = styled(CardActionArea)(({ theme }) => ({ display: 'flex', flexDirection: 'column', padding: theme.spacing(1.5), color: theme.palette.text.disabled, border: `solid 1px ${theme.palette.grey[500_12]}`, borderRadius: Number(theme.shape.borderRadius) * 1.25, })); // ---------------------------------------------------------------------- export default function SettingLayout() { const { themeLayout, onChangeLayout } = useSettings(); return ( {['horizontal', 'vertical'].map((layout) => { const isSelected = themeLayout === layout; const isVertical = layout === 'vertical'; return ( theme.customShadows.z20, }), }} > {isVertical ? ( ) : ( )} ); })} ); } // ---------------------------------------------------------------------- type LayoutBoxProps = { isSelected: boolean; }; const style = { width: 1, height: 32, borderRadius: 0.5, }; function VerticalBox({ isSelected }: LayoutBoxProps) { return ( <> alpha(theme.palette.text.disabled, 0.72), ...(isSelected && { bgcolor: (theme) => alpha(theme.palette.primary.main, 0.72), }), }} /> `dashed 1px ${theme.palette.divider}`, bgcolor: (theme) => alpha(theme.palette.text.disabled, 0.08), ...(isSelected && { border: (theme) => `dashed 1px ${theme.palette.primary.main}`, bgcolor: (theme) => alpha(theme.palette.primary.main, 0.16), }), }} /> ); } function HorizontalBox({ isSelected }: LayoutBoxProps) { return ( <> alpha(theme.palette.text.disabled, 0.72), ...(isSelected && { bgcolor: (theme) => alpha(theme.palette.primary.main, 0.72), }), }} /> alpha(theme.palette.text.disabled, 0.32), ...(isSelected && { bgcolor: (theme) => alpha(theme.palette.primary.main, 0.32), }), }} /> `dashed 1px ${theme.palette.divider}`, bgcolor: (theme) => alpha(theme.palette.text.disabled, 0.08), ...(isSelected && { border: (theme) => `dashed 1px ${theme.palette.primary.main}`, bgcolor: (theme) => alpha(theme.palette.primary.main, 0.16), }), }} /> ); }