Newer
Older
mobile.raikyakun.app / node / src / components / TabPanel.tsx
nutrition on 24 Jul 2024 555 bytes first commit
import { Box } from '@mui/material'


export interface TabPanelProps {
	children?: React.ReactNode
	index: number
	value: number
}

export default function TabPanel(props: TabPanelProps) {
	const { children, value, index, ...other } = props

	return (
		<div
			role="tabpanel"
			hidden={value !== index}
			id={`vertical-tabpanel-${index}`}
			aria-labelledby={`vertical-tab-${index}`}
			style={{width:'100%'}}
			{...other}
		>
			{value === index && (
				<Box sx={{ p: 3 }}>
					{children}
				</Box>
			)}
		</div>
	)
}