Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1348 | fixing margins and scrolls
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Sep 13, 2022
1 parent 87d981e commit 72117bd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
22 changes: 12 additions & 10 deletions src/components/collections/CollectionForm.jsx
Expand Up @@ -228,17 +228,19 @@ class CollectionForm extends React.Component {
const { edit, owner, collection } = this.props
return (
<form>
<div className='col-xs-12' style={{marginBottom: '30px'}}>
<div className='col-xs-12 no-side-padding' style={{marginBottom: '30px', overflowX: 'hidden'}}>
<FormHeader {...CONFIG} edit={edit} />
<NameAndDescription {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={collection} />
<Divider style={{width: '100%'}} />
<ConfigurationForm {...CONFIG} edit={edit} owner={owner} types={TYPES} onChange={this.onChange} repo={collection} />
<Divider style={{width: '100%'}} />
{
((edit && !isEmpty(collection)) || !edit) &&
<AdvanceSettings {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={collection} />
}
<div className='col-xs-12 no-side-padding' style={{position: 'fixed', background: WHITE, bottom: 0, zIndex: 1999}}>
<div className='col-xs-12'>
<NameAndDescription {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={collection} />
<Divider style={{width: '100%'}} />
<ConfigurationForm {...CONFIG} edit={edit} owner={owner} types={TYPES} onChange={this.onChange} repo={collection} />
<Divider style={{width: '100%'}} />
{
((edit && !isEmpty(collection)) || !edit) &&
<AdvanceSettings {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={collection} />
}
</div>
<div className='col-xs-12' style={{position: 'fixed', background: WHITE, bottom: 0, zIndex: 1999}}>
<Button variant='contained' type='submit' onClick={this.onSubmit} style={{margin: '10px 0'}}>
{edit ? 'Update Collection' : 'Create Collection'}
</Button>
Expand Down
Expand Up @@ -5,7 +5,7 @@ import { WHITE } from '../../../common/constants'
const FormHeader = props => {
const iconMarginTop = props.resource === 'source' ? '8px' : '20px'
return (
<div className='col-xs-12 no-side-padding' style={{display: 'flex', position: 'fixed', background: WHITE, zIndex: '1999'}}>
<div className='col-xs-12' style={{display: 'flex', position: 'fixed', background: WHITE, zIndex: '1999'}}>
<span style={{display: 'inline-block'}}>
<DynamicConfigResourceIcon resource={props.resource} enableColor style={{fontSize: '4em', marginTop: iconMarginTop}} />
</span>
Expand Down
22 changes: 12 additions & 10 deletions src/components/sources/SourceForm.jsx
Expand Up @@ -271,17 +271,19 @@ class SourceForm extends React.Component {
const { edit, owner, source } = this.props
return (
<form>
<div className='col-xs-12' style={{marginBottom: '30px'}}>
<div className='col-xs-12 no-side-padding' style={{marginBottom: '30px', overflowX: 'hidden'}}>
<FormHeader {...CONFIG} edit={edit} />
<NameAndDescription {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={source} />
<Divider style={{width: '100%'}} />
<ConfigurationForm {...CONFIG} edit={edit} owner={owner} types={TYPES} onChange={this.onChange} repo={source} />
<Divider style={{width: '100%'}} />
{
((edit && !isEmpty(source)) || !edit) &&
<AdvanceSettings {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={source} />
}
<div className='col-xs-12 no-side-padding' style={{position: 'fixed', background: WHITE, bottom: 0, zIndex: 1999}}>
<div className='col-xs-12'>
<NameAndDescription {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={source} />
<Divider style={{width: '100%'}} />
<ConfigurationForm {...CONFIG} edit={edit} owner={owner} types={TYPES} onChange={this.onChange} repo={source} />
<Divider style={{width: '100%'}} />
{
((edit && !isEmpty(source)) || !edit) &&
<AdvanceSettings {...CONFIG} edit={edit} owner={owner} onChange={this.onChange} repo={source} />
}
</div>
<div className='col-xs-12' style={{position: 'fixed', background: WHITE, bottom: 0, zIndex: 1999}}>
<Button variant='contained' type='submit' onClick={this.onSubmit} style={{margin: '10px 0'}}>
{edit ? 'Update Source' : 'Create Source'}
</Button>
Expand Down

0 comments on commit 72117bd

Please sign in to comment.