Skip to content

Commit

Permalink
fix: styles of the horizontal form (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
paschalidi authored Jan 5, 2021
1 parent 4482632 commit 5592250
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import type { Props, PropsForPureComponent } from './D2Form.types';
import { type Section } from '../../metaData';

export const styles = () => ({
displayFlex: {
display: 'flex',
},
containerCustomForm: {
paddingTop: 10,
paddingBottom: 10,
Expand Down Expand Up @@ -108,6 +105,7 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
)
renderVertical = (section: Section, passOnProps: any, classes: Object) => (
<div
data-test="dhis2-capture-d2-form-component"
className={this.props.formFoundation.customForm ? classes.containerCustomForm : ''}
key={section.id}
>
Expand Down Expand Up @@ -137,7 +135,7 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
const sections = metaDataSectionsAsArray.map(section => (passOnProps.formHorizontal ? this.renderHorizontal(section, passOnProps) : this.renderVertical(section, passOnProps, classes)));

return (
<div className={passOnProps.formHorizontal ? classes.displayFlex : ''} data-test="dhis2-capture-d2-form-component">
<>
{
isFormInReduxStore
?
Expand All @@ -153,7 +151,7 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
),
)
}
</div>
</>
);
}
}
Expand Down

0 comments on commit 5592250

Please sign in to comment.