Skip to content

Commit 6f14d53

Browse files
committed
Fixed persistent scrollbar in props tab, and positioning of some bottom panel components
1 parent 6cd2218 commit 6f14d53

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

src/components/bottom/CodePreview.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ type CodePreviewProps = {
1919
};
2020

2121
class CodePreview extends Component<CodePreviewProps> {
22-
2322
//checking if the code has been asigned yet or not
2423
//if no then generate code and asign to a focus component
2524
componentDidMount() {
@@ -67,10 +66,10 @@ class CodePreview extends Component<CodePreviewProps> {
6766
}}
6867
>
6968
<AceEditor
70-
mode="javascript"
71-
theme="monokai"
72-
width="100%"
73-
height="100%"
69+
mode='javascript'
70+
theme='monokai'
71+
width='100%'
72+
height='100%'
7473
style={{
7574
border: '2px solid #33eb91',
7675
borderRadius: '8px'
@@ -82,19 +81,19 @@ class CodePreview extends Component<CodePreviewProps> {
8281
})
8382
}
8483
value={this.props.focusComponent.code}
85-
name="Code_div"
84+
name='Code_div'
8685
readOnly={this.props.codeReadOnly}
8786
editorProps={{ $blockScrolling: true }}
8887
fontSize={16}
8988
/>
9089
<div style={{ display: 'flex', flexDirection: 'column' }}>
9190
<Button
92-
color="primary"
93-
aria-label="Add"
94-
type="submit"
91+
color='primary'
92+
aria-label='Add'
93+
type='submit'
9594
// disabled={!this.state.propKey || !this.state.propType}
96-
variant="contained"
97-
size="large"
95+
variant='contained'
96+
size='large'
9897
style={{ justifySelf: 'center' }}
9998
className={this.props.classes.startEdit}
10099
onClick={e => {

src/components/bottom/Props.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ class Props extends Component<PropsPropsInt, StateInt> {
266266
}));
267267

268268
return (
269-
<div className={'htmlattr'}>
269+
<div
270+
className={'htmlattr'}
271+
style={{ overflowY: 'auto', height: '85%', marginTop: '1rem' }}
272+
>
270273
{' '}
271274
{/* if no focus component in state, then render message */}
272275
{Object.keys(focusComponent).length < 1 ? (
@@ -299,7 +302,7 @@ class Props extends Component<PropsPropsInt, StateInt> {
299302
className='props-container'
300303
style={{ marginTop: '20px', width: '90%', height: '80%' }}
301304
>
302-
<Grid container spacing={8}>
305+
<Grid container spacing={8} style={{ overflowY: 'auto' }}>
303306
<Grid item xs={3}>
304307
<form
305308
className='props-input'
@@ -409,10 +412,12 @@ class Props extends Component<PropsPropsInt, StateInt> {
409412
item
410413
xs={8}
411414
style={{
412-
height: '17rem',
413-
overflow: 'scroll',
415+
height: '75%',
416+
overflowY: 'auto',
417+
overflowX: 'auto',
414418
marginTop: '1rem',
415-
paddingBottom: '1rem',
419+
// paddingBottom: '1rem',
420+
marginLeft: '6rem',
416421
paddingTop: '0'
417422
}}
418423
>

0 commit comments

Comments
 (0)