import { FormControl, FormLabel, RadioGroup, FormControlLabel, Radio, Typography, } from "@mui/material"; import { Sex } from "../api/MemberApi"; export function SexSelection(p: { readonly?: boolean; current?: Sex; onChange: (s: Sex) => void; }): React.ReactElement { if (p.readonly) { if (p.current === undefined || p.current === null) return <>; return ( Sexe : {p.current === "M" ? "Homme" : "Femme"} ); } return ( Sexe p.onChange(e.target.value as Sex)} > } label="Homme" /> } label="Femme" /> ); }