Skip to content

Commit

Permalink
fix: Corrige un libellé et limite la taille des boutons (situations m…
Browse files Browse the repository at this point in the history
…ax-width)
  • Loading branch information
benguedj committed Nov 13, 2023
1 parent 6b3d018 commit 3407d9b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
39 changes: 22 additions & 17 deletions pages/ab-testing/demographic-data-survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,28 @@ export default function DemographicDataSurvey() {
moisGrossesse,
])

const RadioButtonGroup = ({ groupName, data, defaultData, setItems }) => (
<ToggleButtonGroup type="radio" name={groupName}>
{data.map((item) => (
<ToggleButton
key={item.id}
className={`${item.isChecked ? "btn-checked" : ""}`}
id={`radio-${item.id}`}
value={item.value}
onChange={() =>
setItems(updateRadioButtonSelectedInList(defaultData, item))
}
>
{item.text}
</ToggleButton>
))}
</ToggleButtonGroup>
)
const RadioButtonGroup = ({ groupName, data, defaultData, setItems }) => {
const situationStyle =
groupName === "radio-situation" ? { maxWidth: "410px" } : {}
return (
<ToggleButtonGroup type="radio" name={groupName}>
{data.map((item) => (
<ToggleButton
key={item.id}
style={situationStyle}
className={`${item.isChecked ? "btn-checked" : ""}`}
id={`radio-${item.id}`}
value={item.value}
onChange={() =>
setItems(updateRadioButtonSelectedInList(defaultData, item))
}
>
{item.text}
</ToggleButton>
))}
</ToggleButtonGroup>
)
}

const GenderBloc = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/MoisGrossesseSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function MoisGrossesseSelector({ situations, setMoisGrossesse }) {
return situation.length > 0 ? (
<fieldset>
<legend className="bloc-name">
À quel mois de grossesse êtes vous (vous ou le co-parent) ?
À quel mois de grossesse êtes-vous (vous ou le co-parent) ?
</legend>
<Form.Select
className="fr-select"
Expand Down

0 comments on commit 3407d9b

Please sign in to comment.