1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-15 18:00:05 +00:00

feat: add basic UI for settings and permissions

This commit is contained in:
2022-05-16 23:53:30 +05:00
parent 0781ddd64e
commit 5652325452
6 changed files with 438 additions and 1 deletions

View File

@@ -0,0 +1,57 @@
import * as React from 'react'
import { Box, Paper, Tab, styled } from '@mui/material'
import TabContext from '@mui/lab/TabContext'
import TabList from '@mui/lab/TabList'
import TabPanel from '@mui/lab/TabPanel'
import Permission from './permission'
const StyledTab = styled(Tab)({
background: 'black',
margin: '0 5px 5px 0'
})
const StyledTabpanel = styled(TabPanel)({
flexGrow: 1
})
const Settings = () => {
const [value, setValue] = React.useState('profile')
const handleChange = (event: React.SyntheticEvent, newValue: string) => {
setValue(newValue)
}
return (
<Box
sx={{
display: 'flex',
marginTop: '65px'
}}
>
<TabContext value={value}>
<Box component={Paper} sx={{ margin: '0 5px', height: '92vh' }}>
<TabList
TabIndicatorProps={{
style: {
display: 'none'
}
}}
orientation="vertical"
onChange={handleChange}
>
<StyledTab label="Profile" value="profile" />
<StyledTab label="Permission" value="permission" />
</TabList>
</Box>
<StyledTabpanel value="profile">Profile Page</StyledTabpanel>
<StyledTabpanel value="permission">
<Permission />
</StyledTabpanel>
</TabContext>
</Box>
)
}
export default Settings