Skip to content

Conversation

iNeoO
Copy link
Contributor

@iNeoO iNeoO commented Aug 11, 2025

@ddecrulle ddecrulle changed the title feat(Alert.tsx): add custom role, status or alert feat(Alert): add custom role, status or alert Aug 12, 2025
@ddecrulle ddecrulle merged commit da26384 into codegouvfr:main Aug 12, 2025
6 checks passed
@sylvaingi
Copy link

@iNeoO Even with this patch it looks like we cannot render an uncontrolled Alert (without passing a prop isClosed) with a custom role. Even in controlled mode it seems like the role is only set when the Alert transitions to closed. Am I missing something with the usage of this component?

@iNeoO
Copy link
Contributor Author

iNeoO commented Oct 8, 2025

Hi, shouldn t have probleme, can you provide an exemple of your usage ?

@sylvaingi
Copy link

Here's a reproduction: https://codesandbox.io/p/sandbox/reverent-worker-75w3gp?file=%2Fsrc%2FApp.js%3A8%2C27

Even if i set the role prop, it is not defined on the DOM node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants