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

fix: web component UI fix for studio scrolling

This commit is contained in:
Saad Jutt
2022-04-07 19:10:45 +05:00
parent 61080d4694
commit f257602834

View File

@@ -86,72 +86,67 @@ const Studio = () => {
const classes = useStyles() const classes = useStyles()
return ( return (
<> <Box sx={{ width: '100%', typography: 'body1', marginTop: '50px' }}>
<br /> <TabContext value={tab}>
<br /> <Box
<br /> sx={{
<Box sx={{ width: '100%', typography: 'body1' }}> borderBottom: 1,
<TabContext value={tab}> borderColor: 'divider'
<Box }}
style={{ position: 'fixed', background: 'white', width: '100%' }}
>
<TabList onChange={handleTabChange} centered>
<Tab className={classes.root} label="Code" value="1" />
<Tab className={classes.root} label="Log" value="2" />
<Tooltip title="Displays content from the _webout fileref">
<Tab className={classes.root} label="Webout" value="3" />
</Tooltip>
</TabList>
</Box>
<TabPanel value="1">
{/* <Toolbar /> */}
<Paper
sx={{ sx={{
borderBottom: 1, height: '70vh',
borderColor: 'divider' marginTop: '50px',
padding: '10px',
overflow: 'auto',
position: 'relative'
}} }}
style={{ position: 'fixed', background: 'white', width: '100%' }} elevation={3}
> >
<TabList onChange={handleTabChange} centered> <Editor
<Tab className={classes.root} label="Code" value="1" /> height="95%"
<Tab className={classes.root} label="Log" value="2" /> value={fileContent}
<Tooltip title="Displays content from the _webout fileref"> onMount={handleEditorDidMount}
<Tab className={classes.root} label="Webout" value="3" /> onChange={(val) => {
</Tooltip> if (val) setFileContent(val)
</TabList>
</Box>
<TabPanel value="1">
{/* <Toolbar /> */}
<Paper
sx={{
height: '70vh',
marginTop: '50px',
padding: '10px',
overflow: 'auto',
position: 'relative'
}} }}
elevation={3} />
> </Paper>
<Editor <Stack
height="95%" spacing={3}
value={fileContent} direction="row"
onMount={handleEditorDidMount} sx={{ justifyContent: 'center', marginTop: '20px' }}
onChange={(val) => { >
if (val) setFileContent(val) <Button variant="contained" onClick={handleRunBtnClick}>
}} Run SAS Code
/> </Button>
</Paper> </Stack>
<Stack </TabPanel>
spacing={3} <TabPanel value="2">
direction="row" <div style={{ marginTop: '50px' }}>
sx={{ justifyContent: 'center', marginTop: '20px' }} <h2>SAS Log</h2>
> <pre>{log}</pre>
<Button variant="contained" onClick={handleRunBtnClick}> </div>
Run SAS Code </TabPanel>
</Button> <TabPanel value="3">
</Stack> <div style={{ marginTop: '50px' }}>
</TabPanel> <pre>{webout}</pre>
<TabPanel value="2"> </div>
<div style={{ marginTop: '50px' }}> </TabPanel>
<h2>SAS Log</h2> </TabContext>
<pre>{log}</pre> </Box>
</div>
</TabPanel>
<TabPanel value="3">
<div style={{ marginTop: '50px' }}>
<pre>{webout}</pre>
</div>
</TabPanel>
</TabContext>
</Box>
</>
) )
} }