Skip to content

Commit

Permalink
fix(home): utilisation de balise sémantique <p/> pour les tuiles (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr authored Jan 7, 2025
1 parent 4e8bf39 commit 5fa2057
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { fr } from "@codegouvfr/react-dsfr";
import { Card } from "@codegouvfr/react-dsfr/Card";
import { Tag } from "@codegouvfr/react-dsfr/Tag";

export type HomeCardProps = {
theme: string;
Expand All @@ -16,7 +15,7 @@ export const HomeCard = ({
link,
}: HomeCardProps) => (
<Card
start={<Tag small>{theme}</Tag>}
start={<p className={fr.cx("fr-tag", "fr-tag--sm")}>{theme}</p>}
border
desc={description}
horizontal
Expand All @@ -27,7 +26,7 @@ export const HomeCard = ({
title={title}
titleAs="h3"
enlargeLink
end={<span>Consulter</span>}
end={<p className={fr.cx("fr-m-0", "fr-text--xs")}>Consulter</p>}
classes={{
start: fr.cx("fr-mb-2w"),
end: fr.cx("fr-text--xs"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,20 @@ exports[`<Home /> should match snapshot 1`] = `
<div
class="fr-card__start fr-mb-2w"
>
<span
<p
class="fr-tag fr-tag--sm"
id="fr-tag-:r3:"
>
light
</span>
</p>
</div>
<div
class="fr-card__end fr-text--xs"
>
<span>
<p
class="fr-m-0 fr-text--xs"
>
Consulter
</span>
</p>
</div>
</div>
</div>
Expand Down Expand Up @@ -199,7 +200,7 @@ exports[`<Home /> should match snapshot 1`] = `
>
<div
class="fr-tile fr-enlarge-link fr-tile--vertical"
id="fr-tile-:r4:"
id="fr-tile-:r3:"
>
<div
class="fr-tile__body"
Expand Down Expand Up @@ -247,7 +248,7 @@ exports[`<Home /> should match snapshot 1`] = `
<a
class="fr-btn fr-btn--secondary fr-btn--lg fr-icon-arrow-right-line fr-btn--icon-right"
href="/outils"
id="fr-button-:r5:"
id="fr-button-:r4:"
>
Voir tous les outils
</a>
Expand Down Expand Up @@ -276,7 +277,7 @@ exports[`<Home /> should match snapshot 1`] = `
>
<div
class="fr-card fr-enlarge-link fr-card--horizontal"
id="fr-card-:r6:"
id="fr-card-:r5:"
>
<div
class="fr-card__body"
Expand All @@ -302,19 +303,20 @@ exports[`<Home /> should match snapshot 1`] = `
<div
class="fr-card__start fr-mb-2w"
>
<span
<p
class="fr-tag fr-tag--sm"
id="fr-tag-:r7:"
>
dark
</span>
</p>
</div>
<div
class="fr-card__end fr-text--xs"
>
<span>
<p
class="fr-m-0 fr-text--xs"
>
Consulter
</span>
</p>
</div>
</div>
</div>
Expand All @@ -327,7 +329,7 @@ exports[`<Home /> should match snapshot 1`] = `
<a
class="fr-btn fr-btn--secondary fr-btn--lg fr-icon-arrow-right-line fr-btn--icon-right"
href="/modeles-de-courriers"
id="fr-button-:r8:"
id="fr-button-:r6:"
>
Voir tous les modèles de documents
</a>
Expand Down Expand Up @@ -356,7 +358,7 @@ exports[`<Home /> should match snapshot 1`] = `
>
<div
class="fr-card fr-enlarge-link fr-card--horizontal"
id="fr-card-:r9:"
id="fr-card-:r7:"
>
<div
class="fr-card__body"
Expand All @@ -382,19 +384,20 @@ exports[`<Home /> should match snapshot 1`] = `
<div
class="fr-card__start fr-mb-2w"
>
<span
<p
class="fr-tag fr-tag--sm"
id="fr-tag-:ra:"
>
light
</span>
</p>
</div>
<div
class="fr-card__end fr-text--xs"
>
<span>
<p
class="fr-m-0 fr-text--xs"
>
Consulter
</span>
</p>
</div>
</div>
</div>
Expand All @@ -407,7 +410,7 @@ exports[`<Home /> should match snapshot 1`] = `
<a
class="fr-btn fr-btn--secondary fr-btn--lg fr-icon-arrow-right-line fr-btn--icon-right"
href="/contribution"
id="fr-button-:rb:"
id="fr-button-:r8:"
>
Voir toutes les fiches pratiques
</a>
Expand Down Expand Up @@ -437,7 +440,7 @@ exports[`<Home /> should match snapshot 1`] = `
>
<div
class="fr-card fr-enlarge-link fr-card--horizontal"
id="fr-card-:rc:"
id="fr-card-:r9:"
>
<div
class="fr-card__body"
Expand All @@ -463,19 +466,20 @@ exports[`<Home /> should match snapshot 1`] = `
<div
class="fr-card__start fr-mb-2w"
>
<span
<p
class="fr-tag fr-tag--sm"
id="fr-tag-:rd:"
>
dark
</span>
</p>
</div>
<div
class="fr-card__end fr-text--xs"
>
<span>
<p
class="fr-m-0 fr-text--xs"
>
Consulter
</span>
</p>
</div>
</div>
</div>
Expand All @@ -488,7 +492,7 @@ exports[`<Home /> should match snapshot 1`] = `
<a
class="fr-btn fr-btn--secondary fr-btn--lg fr-icon-arrow-right-line fr-btn--icon-right"
href="/convention-collective"
id="fr-button-:re:"
id="fr-button-:ra:"
>
Voir toutes les conventions collectives
</a>
Expand Down Expand Up @@ -532,7 +536,7 @@ exports[`<Home /> should match snapshot 1`] = `
>
<div
class="fr-tile fr-enlarge-link fr-tile--vertical fr-tile--no-icon fr-tile--sm"
id="fr-tile-:rf:"
id="fr-tile-:rb:"
>
<div
class="fr-tile__body"
Expand Down Expand Up @@ -581,7 +585,7 @@ exports[`<Home /> should match snapshot 1`] = `
<a
class="fr-btn fr-btn--secondary fr-btn--lg fr-icon-arrow-right-line fr-btn--icon-right"
href="/themes"
id="fr-button-:rg:"
id="fr-button-:rc:"
>
Voir tous les thèmes
</a>
Expand Down

0 comments on commit 5fa2057

Please sign in to comment.