-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update the Tile component #150
Comments
Hi, For the svg, I copied the code from the Display component, to use the 3 pictogram colors. So in the parent component, I just need to import the svg and pass it as a prop. It’s pretty convenient that the tile component handles the svg to display the pictogram with correct DSFR colors (and correct colors for dark theme too). import artworkCommunity from "@codegouvfr/react-dsfr/dsfr/artwork/pictograms/leisure/community.svg"
//...
<AppPictoTile
title={title}
//...
pictogramUrl={artworkCommunity}
/> It’s a very helpful piece of code to integrate the pictograms by the way, it could also be a helper function or a component maybe? |
We are facing the same issue inserting pictograms with the right colors and reaction to light and dark themes. Thanks @sbourdon13 for the code example: https://github.com/DNUM-SocialGouv/champollion-front/blob/dev/app/src/components/PictoTile.tsx#L42-L60 A change of the Tile component would be great with an additional property We're giving a try with @ocruze and hopefully make a pull request if successful. |
The structure seems to have changed quite a bit since the component was created:
https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/tuile/
The text was updated successfully, but these errors were encountered: