feat: Extend App pages with tabs and data
This commit is contained in:
19
packages/web/src/components/TabPanel/index.tsx
Normal file
19
packages/web/src/components/TabPanel/index.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
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}
|
||||
{...other}
|
||||
>
|
||||
{value === index && children}
|
||||
</div>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user