Skip to content

Tile support of native pictogram #428

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 5 commits into from
Jun 12, 2025

Conversation

Maxenceee
Copy link
Contributor

This PR resolves #424, including:

  • renaming of some elements for clarity (IconWrapper becomes PictoWrapper, createIcon becomes createPicto, etc.)
  • Tile component can now use native DSFR pictograms with the pictogram prop, which is an exclusive property, alternative to imageUrl and its variations. I did not change any of the previous behavior, it's a plus.
  • Tile tests
  • the pictogram proo has it's own section in the Tile story
import CityHall from "@codegouvfr/react-dsfr/picto/CityHall";

<div
  className="container"
  style={{
    width: 360
  }}
>
  <Tile
    enlargeLinkOrButton
    linkProps={{
      href: '#'
    }}
    orientation="vertical"
    pictogram={<CityHall />}
    title="Intitulé de la tuile"
    titleAs="h3"
  />
</div>

Copy link
Collaborator

@ddecrulle ddecrulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good work thank's !

@ddecrulle ddecrulle merged commit 400ae6d into codegouvfr:main Jun 12, 2025
6 checks passed
@Maxenceee Maxenceee deleted the feature/tile-x-picto branch June 17, 2025 18:47
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.

Iteration over pictograms
2 participants