diff --git a/ui/app/(application)/cerfa/components/blocks/inputs/ConsentInput.tsx b/ui/app/(application)/cerfa/components/blocks/inputs/ConsentInput.tsx index ee126ae..b8ad74d 100644 --- a/ui/app/(application)/cerfa/components/blocks/inputs/ConsentInput.tsx +++ b/ui/app/(application)/cerfa/components/blocks/inputs/ConsentInput.tsx @@ -3,11 +3,6 @@ import { FC } from "react"; import { InputFieldProps } from "./InputField"; -const mapState = (state: "error" | "info" | "default" | "success" | undefined) => { - if (state === "info") return "default"; - return state; -}; - const ConsentInput: FC = ({ fieldSchema, state, stateRelatedMessage, inputProps }) => { return ( = ({ fieldSchema, state, stateRelatedMes nativeInputProps: inputProps, }, ]} - state={mapState(state)} // Use the mapped state + state={state} stateRelatedMessage={stateRelatedMessage} disabled={inputProps.disabled} /> diff --git a/ui/package.json b/ui/package.json index 23f52c5..ec8b540 100644 --- a/ui/package.json +++ b/ui/package.json @@ -15,7 +15,7 @@ "prebuild": "only-include-used-icons" }, "dependencies": { - "@codegouvfr/react-dsfr": "^1.14.1", + "@codegouvfr/react-dsfr": "^0.75.7", "@emotion/react": "^11.11.1", "@emotion/server": "^11.11.0", "@emotion/styled": "^11.11.0", diff --git a/yarn.lock b/yarn.lock index 839bff9..aae5074 100644 --- a/yarn.lock +++ b/yarn.lock @@ -114,22 +114,15 @@ __metadata: languageName: node linkType: hard -"@codegouvfr/react-dsfr@npm:^1.14.1": - version: 1.14.1 - resolution: "@codegouvfr/react-dsfr@npm:1.14.1" +"@codegouvfr/react-dsfr@npm:^0.75.7": + version: 0.75.8 + resolution: "@codegouvfr/react-dsfr@npm:0.75.8" dependencies: - tsafe: ^1.7.2 - yargs-parser: ^21.1.1 - peerDependencies: - "@gouvfr/dsfr-chart": ^1.0.0 - peerDependenciesMeta: - "@gouvfr/dsfr-chart": - optional: true + tsafe: ^1.6.3 bin: copy-dsfr-to-public: bin/copy-dsfr-to-public.js only-include-used-icons: bin/only-include-used-icons.js - react-dsfr: bin/react-dsfr.js - checksum: b8b8b662f17c5f8459d0de579d03618110e659fbd95befc197c438307ad4ac6ab57893cd41da4ef72a13e9ea7d0ce89a48ad076849d6d63155586987d0f0de15 + checksum: d142e74ec6cd211b96e2d8252fbcaea20e9c4a3cb3eb0acab2a71191c96d75abd9089dc14ee7944f39c17e49e4fb99d6b3b6c2621db80ad6a412034f0d954292 languageName: node linkType: hard @@ -16216,7 +16209,7 @@ __metadata: languageName: node linkType: hard -"tsafe@npm:^1.7.2": +"tsafe@npm:^1.6.3": version: 1.7.5 resolution: "tsafe@npm:1.7.5" checksum: ea7193ebdd8bb59c0c1a40dae3029c686bb7e2db74c9fe029f61ff2223acd5bba6e3a272f8f4bba87efd6434321d5edbab9eb32647a68bae9864d3efe7bb28d7 @@ -16510,7 +16503,7 @@ __metadata: version: 0.0.0-use.local resolution: "ui@workspace:ui" dependencies: - "@codegouvfr/react-dsfr": ^1.14.1 + "@codegouvfr/react-dsfr": ^0.75.7 "@emotion/react": ^11.11.1 "@emotion/server": ^11.11.0 "@emotion/styled": ^11.11.0