-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from betagouv/maud/tags_fixes
Tag changes
- Loading branch information
Showing
13 changed files
with
199 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Tag from "@codegouvfr/react-dsfr/Tag"; | ||
import { cx } from "@codegouvfr/react-dsfr/tools/cx"; | ||
import React from "react"; | ||
import { ATC } from "@/data/grist/atc"; | ||
import "./dsfr-custom-tags.css"; | ||
|
||
export default function ClassTag(props: { atc2: ATC }) { | ||
return ( | ||
<Tag | ||
linkProps={{ | ||
href: `/atc/${props.atc2.code}`, | ||
className: cx("fr-tag--custom-alt-class"), | ||
}} | ||
> | ||
{props.atc2.label} | ||
</Tag> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Tag from "@codegouvfr/react-dsfr/Tag"; | ||
import React from "react"; | ||
import { cx } from "@codegouvfr/react-dsfr/tools/cx"; | ||
import "./dsfr-custom-tags.css"; | ||
|
||
export default function GenericTag(props: { specGeneId: string }) { | ||
return ( | ||
<Tag | ||
iconId="fr-icon-capsule-fill" | ||
linkProps={{ | ||
className: cx("fr-tag--custom-alt-blue"), | ||
href: `/generiques/${props.specGeneId}`, | ||
}} | ||
> | ||
Générique | ||
</Tag> | ||
); | ||
} |
15 changes: 7 additions & 8 deletions
15
src/components/PediatricsTags.tsx → src/components/tags/PediatricsTags.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Tag from "@codegouvfr/react-dsfr/Tag"; | ||
import type { FrIconClassName } from "@codegouvfr/react-dsfr/src/fr/generatedFromCss/classNames"; | ||
import React from "react"; | ||
import { cx } from "@codegouvfr/react-dsfr/tools/cx"; | ||
import "./dsfr-custom-tags.css"; | ||
|
||
export default function PregnancyTag() { | ||
return ( | ||
<Tag | ||
iconId={"fr-icon--custom-pregnancy" as FrIconClassName} | ||
linkProps={{ | ||
href: "#", | ||
className: cx("fr-tag--custom-alt-contraindication"), | ||
}} | ||
> | ||
Contre-indication grossesse | ||
</Tag> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Tag from "@codegouvfr/react-dsfr/Tag"; | ||
import React from "react"; | ||
import { cx } from "@codegouvfr/react-dsfr/tools/cx"; | ||
import "./dsfr-custom-tags.css"; | ||
|
||
export default function PrescriptionTag() { | ||
return ( | ||
<Tag | ||
iconId="fr-icon-file-text-fill" | ||
nativeButtonProps={{ | ||
className: cx("fr-tag--custom-alt-blue"), | ||
}} | ||
> | ||
Sur ordonnance | ||
</Tag> | ||
); | ||
} |
Oops, something went wrong.