Skip to content

Commit f252f40

Browse files
committed
front: apply style
1 parent 7f4eecb commit f252f40

File tree

1 file changed

+50
-38
lines changed

1 file changed

+50
-38
lines changed

front/src/applications/stdcm/components/STDCMAllowances.tsx

+50-38
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ import { ALLOWANCE_UNITS_KEYS } from './OldAllowances/allowancesConsts';
2929
// <div className="row">
3030
// <div className="col-6">
3131
// <div>{t('allowances:gridMarginBeforeAfter')}</div>
32-
// <div className="row">
33-
// <div className="col-6">
34-
// <StdcmSingleAllowance typeKey="gridMarginBefore" isCondensed />
35-
// </div>
36-
// <div className="col-6">
37-
// <StdcmSingleAllowance typeKey="gridMarginAfter" isCondensed />
38-
// </div>
39-
// </div>
32+
// <div className="row">
33+
// <div className="col-6">
34+
// <StdcmSingleAllowance typeKey="gridMarginBefore" isCondensed />
35+
// </div>
36+
// <div className="col-6">
37+
// <StdcmSingleAllowance typeKey="gridMarginAfter" isCondensed />
38+
// </div>
39+
// </div>
4040
// </div>
4141
// <div className="col-6">
4242
// <div>{t('allowances:standardAllowance')}</div>
@@ -78,36 +78,48 @@ const STDCMAllowances = () => {
7878
};
7979

8080
return (
81-
<div>
82-
<InputSNCF
83-
id="standardAllowanceTypeGridMarginBefore"
84-
type="text"
85-
value={gridMarginBefore}
86-
unit={ALLOWANCE_UNITS_KEYS.time}
87-
condensed
88-
onChange={(e) => dispatch(updateGridMarginBefore(+e.target.value || 0))}
89-
sm
90-
noMargin
91-
/>
92-
<InputSNCF
93-
id="standardAllowanceTypeGridMarginAfter"
94-
type="text"
95-
value={gridMarginAfter}
96-
unit={ALLOWANCE_UNITS_KEYS.time}
97-
condensed
98-
onChange={(e) => dispatch(updateGridMarginAfter(+e.target.value || 0))}
99-
sm
100-
noMargin
101-
/>
102-
<InputGroupSNCF
103-
id="standardAllowanceTypeSelect"
104-
options={standardAllowanceTypes}
105-
handleType={onchangeType}
106-
value={stdcmStandardAllowance?.value || 0}
107-
type={stdcmStandardAllowance?.type || ''}
108-
condensed
109-
sm
110-
/>
81+
<div className="row osrd-config-item mb-2 osrd-config-item-container">
82+
<div className="col-6">
83+
<label htmlFor="gridMarginBeforeAfter">{t('allowances:gridMarginBeforeAfter')}</label>
84+
<div id="gridMarginBeforeAfter" className="row">
85+
<div className="col-6">
86+
<InputSNCF
87+
id="standardAllowanceTypeGridMarginBefore"
88+
type="text"
89+
value={gridMarginBefore}
90+
unit={ALLOWANCE_UNITS_KEYS.time}
91+
condensed
92+
onChange={(e) => dispatch(updateGridMarginBefore(+e.target.value || 0))}
93+
sm
94+
noMargin
95+
/>
96+
</div>
97+
<div className="col-6">
98+
<InputSNCF
99+
id="standardAllowanceTypeGridMarginAfter"
100+
type="text"
101+
value={gridMarginAfter}
102+
unit={ALLOWANCE_UNITS_KEYS.time}
103+
condensed
104+
onChange={(e) => dispatch(updateGridMarginAfter(+e.target.value || 0))}
105+
sm
106+
noMargin
107+
/>
108+
</div>
109+
</div>
110+
</div>
111+
<div className="col-6">
112+
<label htmlFor="standardAllowanceTypeSelect">{t('allowances:standardAllowance')}</label>
113+
<InputGroupSNCF
114+
id="standardAllowanceTypeSelect"
115+
options={standardAllowanceTypes}
116+
handleType={onchangeType}
117+
value={stdcmStandardAllowance?.value || 0}
118+
type={stdcmStandardAllowance?.type || ''}
119+
condensed
120+
sm
121+
/>
122+
</div>
111123
</div>
112124
);
113125
};

0 commit comments

Comments
 (0)