codegouvfr / react-dsfr

🇫🇷 The French Government Design system React toolkit
https://react-dsfr.codegouv.studio
MIT License
406 stars 51 forks source link

Badge element can also be a span #200

Closed sbourdon13 closed 10 months ago

sbourdon13 commented 11 months ago

Currently, the Badge element is a <p>, but it could also be a <span> when the Badge is used inside a \

. For example, in the header title, I need a span to avoid the error <p> cannot appear as a descendant of <p>.

See example "Header avec bandeau BETA" at https://main--ds-gouv.netlify.app/example/component/header/

garronej commented 10 months ago

Thank you!