Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Jul 25, 2023
2 parents 8485cd3 + 3bc5467 commit 7291c33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codegouvfr/react-dsfr",
"version": "0.72.4",
"version": "0.73.0",
"description": "French State Design System React integration library",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion src/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ export const Alert = memo(

const refShouldButtonGetFocus = useRef(false);
const refShouldSetRole = useRef(false);
const DescriptionTag = typeof description === "string" ? "p" : "div";

useEffect(() => {
if (props_isClosed === undefined) {
Expand Down Expand Up @@ -172,7 +173,7 @@ export const Alert = memo(
{title}
</HtmlTitleTag>
)}
<p className={classes.description}>{description}</p>
<DescriptionTag className={classes.description}>{description}</DescriptionTag>
{isClosable && (
<button
ref={setButtonElement}
Expand Down
8 changes: 4 additions & 4 deletions src/shared/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ export const Fieldset = memo(
}
})()}
className={fr.cx(
"fr-message",
(() => {
switch (state) {
case "error":
return "fr-error-text";
return "fr-message--error";
case "success":
return "fr-valid-text";
return "fr-message--valid";
}
})(),
"fr-message"
})()
)}
>
{stateRelatedMessage}
Expand Down

0 comments on commit 7291c33

Please sign in to comment.