Skip to content

feat: Ajout des pictogrammes du DSFR đź’Ž #413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
May 28, 2025

Conversation

Maxenceee
Copy link
Contributor

@Maxenceee Maxenceee commented May 25, 2025

Bonjour,

Dans le cadre du développement de la Startup d'État Datalma, nous utilisons ce module pour intégrer facilement le DSFR dans nos environnements React. Il est très bien conçu ; cependant, nous avons constaté l'absence des pictogrammes, que nous avons dû implémenter nous-mêmes pour répondre à nos besoins.

Ayant déjà réalisé ce travail, j’ai pensé qu’il serait pertinent de proposer une implémentation, inspirée de celle de Mui, afin de compléter ce module.

Cette PR contient :

  • Un dossier contenant l'ensemble des pictogrammes de la librairie Figma au format vectoriel
  • Un script permettant de convertir les fichiers SVG en un fichier du mĂŞme nom exportant un composant React reprĂ©sentant le pictogramme ainsi qu'un index (Ă©galement rĂ©fĂ©rencĂ© dans le package.json)
  • Une nouvelle page dans le dossier de test prĂ©sentant tous les pictogrammes

Les pictogrammes sont accessibles via l'import du dossier @codegouvfr/react-dsfr/picto

Exemple :

import { Book } from '@codegouvfr/react-dsfr/picto';

const SomeComp = () => {
    return (
        <Book fontSize="large" />
    );
}
exemple

J'espère que cela vous semblera pertinent ;)

@Maxenceee Maxenceee changed the title feat: Ajout des pictogrammes du DSFR feat: Ajout des pictogrammes du DSFR đź’Ž May 25, 2025
@garronej
Copy link
Collaborator

This is briliant thanks!

@garronej garronej merged commit 031e938 into codegouvfr:main May 28, 2025
6 checks passed
@garronej
Copy link
Collaborator

garronej commented May 28, 2025

@Maxenceee

Thanks again for the time and energy you put into this, it’s really appreciated.

I had to revert the changes as the dependency updates caused some issues in downstream projects, especially with Storybook. React-related dependencies are a bit tricky in this library because of how it's used across very different stacks, and we try to avoid touching them unless strictly necessary.

Would you mind opening a new PR with just the relevant updates (excluding the dependency changes)? That would be super helpful.

Thanks again!

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.

2 participants