Skip to content

Commit 5592250

Browse files
authored
fix: styles of the horizontal form (#1265)
1 parent 4482632 commit 5592250

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/core_modules/capture-core/components/D2Form/D2Form.component.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ import type { Props, PropsForPureComponent } from './D2Form.types';
88
import { type Section } from '../../metaData';
99

1010
export const styles = () => ({
11-
displayFlex: {
12-
display: 'flex',
13-
},
1411
containerCustomForm: {
1512
paddingTop: 10,
1613
paddingBottom: 10,
@@ -108,6 +105,7 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
108105
)
109106
renderVertical = (section: Section, passOnProps: any, classes: Object) => (
110107
<div
108+
data-test="dhis2-capture-d2-form-component"
111109
className={this.props.formFoundation.customForm ? classes.containerCustomForm : ''}
112110
key={section.id}
113111
>
@@ -137,7 +135,7 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
137135
const sections = metaDataSectionsAsArray.map(section => (passOnProps.formHorizontal ? this.renderHorizontal(section, passOnProps) : this.renderVertical(section, passOnProps, classes)));
138136

139137
return (
140-
<div className={passOnProps.formHorizontal ? classes.displayFlex : ''} data-test="dhis2-capture-d2-form-component">
138+
<>
141139
{
142140
isFormInReduxStore
143141
?
@@ -153,7 +151,7 @@ class D2Form extends React.PureComponent<PropsForPureComponent> {
153151
),
154152
)
155153
}
156-
</div>
154+
</>
157155
);
158156
}
159157
}

0 commit comments

Comments
 (0)