Skip to content

Commit 30a6477

Browse files
authored
Merge pull request #1075 from MaitreManuel/dsfr-footer-link-list-category-name-tag
DsfrFooterLinkList Fixe sur la balise de titre
2 parents f6cdbfd + b25f3f4 commit 30a6477

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/components/DsfrFooter/DsfrFooter.types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export type DsfrFooterLinkProps = {
3030

3131
export type DsfrFooterLinkListProps = {
3232
categoryName: string
33-
links: DsfrFooterLinkProps[]
33+
links: DsfrFooterLinkProps[],
34+
titleTag: string,
3435
}
3536

3637
export type DsfrFooterProps = {

src/components/DsfrFooter/DsfrFooterLinkList.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Le composant se compose de deux parties principales :
1313

1414
## 🛠️ Props
1515

16-
| Nom de Prop | Type | Par défaut | Description |
17-
|-------------|------|------------|-------------|
18-
| `categoryName` | `string` | `'Nom de la catégorie'` | Le nom de la catégorie de liens affichée. |
19-
| `links` | `Array<DsfrFooterLinkProps>` | `[]` | Un tableau d'objets représentant les liens à afficher. Chaque objet peut avoir les propriétés de `DsfrFooterLinkProps`. |
16+
| Nom de Prop | Type | Par défaut | Description |
17+
|----------------|------------------------------|------------|-----------------------------------------------------------------------------------------------------------------------|
18+
| `categoryName` | `string` | `'Nom de la catégorie'` | Le nom de la catégorie de liens affichée. |
19+
| `links` | `Array<DsfrFooterLinkProps>` | `[]` | Un tableau d'objets représentant les liens à afficher. Chaque objet peut avoir les propriétés de `DsfrFooterLinkProps`. |
20+
| `titleTag` | `string` | `'h3'` | Le type de balise pour afficher `categoryName` | |
2021

2122
## 📡Événements
2223

src/components/DsfrFooter/DsfrFooterLinkList.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ export type {
88
withDefaults(defineProps<DsfrFooterLinkListProps>(), {
99
categoryName: 'Nom de la catégorie',
1010
links: () => [],
11+
titleTag: 'h3',
1112
})
1213
</script>
1314

1415
<template>
1516
<div>
16-
<h3 class="fr-footer__top-cat">
17+
<component
18+
class="fr-footer__top-cat"
19+
:is="titleTag"
20+
>
1721
{{ categoryName }}
18-
</h3>
22+
</component>
1923
<ul class="fr-footer__top-list">
2024
<li
2125
v-for="(link, idx) in links"

0 commit comments

Comments
 (0)