From 6c6b46c6fe99dfbe532f147818b09d355ae38ce6 Mon Sep 17 00:00:00 2001 From: DaBadBunny Date: Thu, 21 Dec 2023 14:43:17 +0100 Subject: [PATCH] feat: :sparkles: composant fonctionnel sans js du dsfr --- .vitepress/config.ts | 4 +- .vitepress/theme/style.css | 28 ++++- src/components/DsfrTooltip/DsfrTooltip.md | 20 ++++ src/components/DsfrTooltip/DsfrTooltip.vue | 109 +++++++++++------- .../docs-demo/DsfrTooltipExample.vue | 23 ++++ 5 files changed, 142 insertions(+), 42 deletions(-) create mode 100644 src/components/DsfrTooltip/DsfrTooltip.md create mode 100644 src/components/DsfrTooltip/docs-demo/DsfrTooltipExample.vue diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 597122da..f6ba25c4 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -106,8 +106,8 @@ export default defineConfig({ link: '/composants/DsfrSegmented.md', }, { - text: 'DsfrSegmentedSet', - link: '/composants/DsfrSegmentedSet.md', + text: 'DsfrTooltip', + link: '/composants/DsfrTooltip.md', }, ] }, diff --git a/.vitepress/theme/style.css b/.vitepress/theme/style.css index 5d9d51d0..0fa22142 100644 --- a/.vitepress/theme/style.css +++ b/.vitepress/theme/style.css @@ -7,7 +7,7 @@ * Colors * -------------------------------------------------------------------------- */ -@font-face { + @font-face { font-family: Marianne; src: url("@gouvfr/dsfr/dist/fonts/Marianne-Light.woff2") format("woff2"), url("@gouvfr/dsfr/dist/fonts/Marianne-Light.woff") format("woff"); font-weight: 300; @@ -160,3 +160,29 @@ .vp-doc summary { cursor: pointer; } + +.demo-container-col { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.flex { + display: flex; +} + +.justify-between { + justify-content: space-between; +} + +.justify-center { + justify-content: center; +} + +.gap-4 { + gap: 1rem; +} + +.w-full { + width: 100%; +} diff --git a/src/components/DsfrTooltip/DsfrTooltip.md b/src/components/DsfrTooltip/DsfrTooltip.md new file mode 100644 index 00000000..1276a2c0 --- /dev/null +++ b/src/components/DsfrTooltip/DsfrTooltip.md @@ -0,0 +1,20 @@ +# Information contextuelle et Infobulle - DsfrTooltip + + +## Un exemple + + +::: code-group + + + + + +<<< docs-demo/DsfrTooltipExample.vue [Code de la démo] + +<<< DsfrTooltip.vue +::: + + diff --git a/src/components/DsfrTooltip/DsfrTooltip.vue b/src/components/DsfrTooltip/DsfrTooltip.vue index 83b2af8c..619aac7b 100644 --- a/src/components/DsfrTooltip/DsfrTooltip.vue +++ b/src/components/DsfrTooltip/DsfrTooltip.vue @@ -1,58 +1,89 @@