From 3dfe72f8f68e299d055803bda216d6ece1ec1c5b Mon Sep 17 00:00:00 2001 From: Jimmy Holway Date: Fri, 4 Aug 2023 12:32:43 +0200 Subject: [PATCH] feat(pages-chronicle): puts playground and explorer into tabbed layout view SXT-1023 Signed-off-by: Jimmy Holway --- src/pages/deployment/chronicle/index.tsx | 71 ++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/pages/deployment/chronicle/index.tsx diff --git a/src/pages/deployment/chronicle/index.tsx b/src/pages/deployment/chronicle/index.tsx new file mode 100644 index 00000000..cbb7bf2e --- /dev/null +++ b/src/pages/deployment/chronicle/index.tsx @@ -0,0 +1,71 @@ +import * as React from 'react'; +import { styled } from '@mui/system'; +import Box from '@mui/material/Box'; +import Tab from '@mui/material/Tab'; +import Tabs from '@mui/material/Tabs'; + +import Explorer from './Explorer'; +import Playground from './Playground'; + +interface TabPanelProps { + children?: React.ReactNode; + index: number; + value: number; +} + +const VerticalFillContainer = styled('div')({ + display: 'flex', + flexDirection: 'column', + flexGrow: 1, + width: '100%', +}) + +function CustomTabPanel(props: TabPanelProps) { + const { children, value, index, ...other } = props; + + return ( + + {value === index && children} + + ); +} + +function a11yProps(index: number) { + return { + id: `simple-tab-${index}`, + 'aria-controls': `simple-tabpanel-${index}`, + }; +} + +export default function BasicTabs() { + const [value, setValue] = React.useState(0); + + const handleChange = (event: React.SyntheticEvent, newValue: number) => { + setValue(newValue); + }; + + return ( + + + + + + + + + + + + + + + + + ) +}