import { styled } from '@mui/material'; import { VerticalTab } from './VerticalTab/VerticalTab'; const StyledTabPage = styled('div')(({ theme }) => ({ display: 'flex', gap: theme.spacing(3), [theme.breakpoints.down('md')]: { flexDirection: 'column', }, })); const StyledTabPageContent = styled('div')(() => ({ flexGrow: 1, display: 'flex', flexDirection: 'column', })); const StyledTabs = styled('div')(({ theme }) => ({ display: 'flex', flexDirection: 'column', gap: theme.spacing(1), width: theme.spacing(30), flexShrink: 0, [theme.breakpoints.down('md')]: { width: '100%', }, })); export interface ITab { id: string; label: string; path?: string; hidden?: boolean; icon?: React.ReactNode; } interface IVerticalTabsProps { tabs: ITab[]; value: string; onChange: (tab: ITab) => void; children: React.ReactNode; } export const VerticalTabs = ({ tabs, value, onChange, children, }: IVerticalTabsProps) => ( {tabs .filter((tab) => !tab.hidden) .map((tab) => ( onChange(tab)} icon={tab.icon} /> ))} {children} );