Skip to content

Commit 6e7ad63

Browse files
conditionnal layout
1 parent 0a86a62 commit 6e7ad63

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

front/src/applications/osrd/components/Simulation/Allowances/StandardAllowanceDefault.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function StandardAllowanceDefault(props) {
2828
title,
2929
changeType,
3030
typeKey,
31-
getBaseValue
31+
getBaseValue,
3232
} = props;
3333

3434
const [value, setValue] = useState({
@@ -37,8 +37,6 @@ export default function StandardAllowanceDefault(props) {
3737
});
3838
const [distribution, setDistribution] = useState(distributionsTypes[0]);
3939

40-
41-
4240
const debouncedChangeType = useMemo(
4341
() =>
4442
debounce(
@@ -198,14 +196,16 @@ export default function StandardAllowanceDefault(props) {
198196
}, [getBaseValue, typeKey]);
199197

200198
return (
201-
<div className="row w-100 mareco">
202-
<div className="col-md-2 text-normal">{title || t('sandardAllowancesWholePath')}</div>
199+
<div className={`${options.immediateMutation ? 'mareco' : 'row w-100 mareco'}`}>
200+
<div className={`${options.immediateMutation ? 'text-normal' : 'col-md-2 text-normal'}`}>
201+
{title || t('sandardAllowancesWholePath')}
202+
</div>
203203

204204
<div className="col">
205205
<div className="row">
206206
{options.setDistribution && (
207207
<>
208-
<div className="col-md-2 text-normal">{t('Valeur par défault')}</div>
208+
<div className="col-md-2 text-normal">{t('perDefaultValue')}</div>
209209
<div className="col-md-4">
210210
<SelectSNCF
211211
id="distributionTypeSelector"

0 commit comments

Comments
 (0)