diff --git a/_includes/components/alert.njk b/_includes/components/alert.njk new file mode 100644 index 0000000..419ff48 --- /dev/null +++ b/_includes/components/alert.njk @@ -0,0 +1,7 @@ +{% if not alert %}{% set alert = params %}{% endif %} +
Le contenu de l'alerte
" +}) }} +{% endraw %} +``` + +Référence : [https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/alerte](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/alerte) + +## Rendu + +{% from "components/component.njk" import component with context %} +{{ component("alert", { + type: "info", + title: "Titre de l'info", + description: "Le contenu de l'alerte
" +}) }} + +{% from "components/component.njk" import component with context %} +{{ component("alert", { + type: "warning", + title: "Titre de l'avertissement", + description: "Le contenu de l'alerte
" +}) }} + +{% from "components/component.njk" import component with context %} +{{ component("alert", { + type: "success", + description: "Contenu de l'alerte seul
" +}) }} + +{% from "components/component.njk" import component with context %} +{{ component("alert", { + type: "error", + title: "Titre de l'erreur seul" +}) }} + +---- + +Alerte sans type précisé (défaut info) : + +{% from "components/component.njk" import component with context %} +{{ component("alert", { + title: "Titre de l'info", + description: "Le contenu de l'alerte
" +}) }} \ No newline at end of file