Skip to content

Commit 52e18f0

Browse files
authored
Merge pull request #846 from dnum-mi/fix/DsfrFooter/remtrait_style_impose
fix(DsfrFooter): 🐛 retrait style imposé
2 parents d68e9fa + 0466bd0 commit 52e18f0

File tree

4 files changed

+35
-45
lines changed

4 files changed

+35
-45
lines changed

demo-app/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ const currentRoute = computed(() => route.name)
302302
operator-img-src="https://loremflickr.com/300/200/cat"
303303
operator-img-alt="L'opérateur petit chat"
304304
operator-to="/"
305+
:operator-img-style="{ 'margin-left': '0.5px', padding: '1rem', 'max-width': '15rem' }"
305306
/>
306307
</div>
307308

src/components/DsfrFooter/DsfrFooter.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,31 @@ Ce composant se structure en plusieurs parties, incluant :
2121

2222
## 🛠️ Props
2323

24-
| nom | type | défaut | obligatoire |
25-
|------------------------|--------------------------------------------------------------------------------------| ------------------------------------------ | ----------- |
26-
| `a11yCompliance` | *`string`* | `'non conforme'` | |
27-
| `a11yComplianceLink` | *`import('vue-router').RouteLocationRaw`* | `/a11y` | |
28-
| `legalLink` | *`string`* | `/mentions-legales` | |
29-
| `homeLink` | *`import('vue-router').RouteLocationRaw`* | `/` | |
30-
| `homeTitle` | *`string`* | `Retour à l’accueil` | |
31-
| `partners` | *`DsfrFooterPartnersProps`* | `undefined` | |
32-
| `personalDataLink` | *`string`* | `/donnees-personnelles` | |
33-
| `cookiesLink` | *`string`* | `/cookies` | |
34-
| `logoText` | *`string` \| `string[]`* | `() => ['République', 'Française']` | |
35-
| `descText` | *`string`* | `undefined` | |
36-
| `beforeMandatoryLinks` | *`DsfrFooterLinkProps[]`* | `() => []` | |
37-
| `afterMandatoryLinks` | *`DsfrFooterLinkProps[]`* | `() => []` | |
38-
| `mandatoryLinks` | *`{label: string, to: import('vue-router').RouteLocationRaw \| undefined}[]`* | Dynamique (voir script) | |
39-
| `ecosystemLinks` | *`{label: string, href: string}[]`* | Dynamique (voir script) | |
40-
| `operatorLinkText` | *`string`* | `'Revenir à l’accueil'` | |
41-
| `operatorTo` | *`import('vue-router').RouteLocationRaw` \| `undefined`* | `/` | |
42-
| `operatorImgStyle` | *`import('vue').StyleValue`* | `undefined` | |
43-
| `operatorImgSrc` | *`string`* | `undefined` | |
44-
| `operatorImgAlt` | *`string`* | `''` | |
45-
| `licenceTo` | *`string`* | `'https://github.com/etalab/licence-ouverte/blob/master/LO.md'` | |
46-
| `licenceLinkProps` | *`{ href: string }` \| `{ to: import('vue-router').RouteLocationRaw \| undefined }`* | `undefined` | |
47-
| `licenceText` | *`string`* | `'Sauf mention contraire, tous les textes de ce site sont sous'` | |
48-
| `licenceName` | *`string`* | `'licence etalab-2.0'` | |
24+
| nom | type | défaut | obligatoire |
25+
|------------------------|--------------------------------------------------------------------------------------|------------------------------------------------------------------|-------------|
26+
| `a11yCompliance` | *`string`* | `'non conforme'` | |
27+
| `a11yComplianceLink` | *`import('vue-router').RouteLocationRaw`* | `/a11y` | |
28+
| `legalLink` | *`string`* | `/mentions-legales` | |
29+
| `homeLink` | *`import('vue-router').RouteLocationRaw`* | `/` | |
30+
| `homeTitle` | *`string`* | `Retour à l’accueil` | |
31+
| `partners` | *`DsfrFooterPartnersProps`* | `undefined` | |
32+
| `personalDataLink` | *`string`* | `/donnees-personnelles` | |
33+
| `cookiesLink` | *`string`* | `/cookies` | |
34+
| `logoText` | *`string` \| `string[]`* | `() => ['République', 'Française']` | |
35+
| `descText` | *`string`* | `undefined` | |
36+
| `beforeMandatoryLinks` | *`DsfrFooterLinkProps[]`* | `() => []` | |
37+
| `afterMandatoryLinks` | *`DsfrFooterLinkProps[]`* | `() => []` | |
38+
| `mandatoryLinks` | *`{label: string, to: import('vue-router').RouteLocationRaw \| undefined}[]`* | Dynamique (voir script) | |
39+
| `ecosystemLinks` | *`{label: string, href: string}[]`* | Dynamique (voir script) | |
40+
| `operatorLinkText` | *`string`* | `'Revenir à l’accueil'` | |
41+
| `operatorTo` | *`import('vue-router').RouteLocationRaw` \| `undefined`* | `/` | |
42+
| `operatorImgStyle` | *`import('vue').StyleValue`* | `undefined` | |
43+
| `operatorImgSrc` | *`string`* | `undefined` | |
44+
| `operatorImgAlt` | *`string`* | `''` | |
45+
| `licenceTo` | *`string`* | `'https://github.com/etalab/licence-ouverte/blob/master/LO.md'` | |
46+
| `licenceLinkProps` | *`{ href: string }` \| `{ to: import('vue-router').RouteLocationRaw \| undefined }`* | `undefined` | |
47+
| `licenceText` | *`string`* | `'Sauf mention contraire, tous les textes de ce site sont sous'` | |
48+
| `licenceName` | *`string`* | `'licence etalab-2.0'` | |
4949

5050
::: tip Des boutons après la liste de liens
5151

src/components/DsfrFooter/DsfrFooter.stories.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,11 @@ export const PiedDePageAvecLogoOperateur = (args) => ({
247247
:licence-to="licenceTo"
248248
:licence-name="licenceName"
249249
:licence-link-props="licenceLinkProps"
250+
:operator-link-text="operatorLinkText"
251+
:operator-to="operatorTo"
252+
:operator-img-style="operatorImgStyle"
253+
:operator-img-src="operatorImgSrc"
254+
:operator-img-alt="operatorImgAlt"
250255
>
251256
<template #footer-link-lists>
252257
<DsfrFooterLinkList
@@ -339,8 +344,8 @@ PiedDePageAvecLogoOperateur.args = {
339344
],
340345
},
341346
operatorLinkText: 'Logo opérateur',
342-
operatorTo: 'https://loremflickr.com/80/80/cat',
343-
operatorImgStyle: { 'max-height': '10rem' },
347+
operatorTo: 'https://github.com/dnum-mi/vue-dsfr',
348+
operatorImgStyle: { 'margin-left': '0.5px', padding: '1rem', height: '150px' },
344349
operatorImgSrc: '/cat.svg',
345350
operatorImgAlt: 'Logo opérateur',
346351
}

src/components/DsfrFooter/DsfrFooter.vue

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,7 @@ const externalOperatorLink = computed(() => {
141141
>
142142
<img
143143
class="fr-footer__logo"
144-
:style="[
145-
typeof operatorImgStyle === 'string' ? operatorImgStyle : '',
146-
{
147-
'margin-left': '0.5px',
148-
padding: '1rem',
149-
...(typeof operatorImgStyle === 'object' ? operatorImgStyle : {}),
150-
'max-width': '12.5rem',
151-
},
152-
]"
144+
:style="operatorImgStyle"
153145
:src="operatorImgSrc"
154146
:alt="operatorImgAlt"
155147
>
@@ -162,15 +154,7 @@ const externalOperatorLink = computed(() => {
162154
>
163155
<img
164156
class="fr-footer__logo"
165-
:style="[
166-
typeof operatorImgStyle === 'string' ? operatorImgStyle : '',
167-
{
168-
'margin-left': '0.5px',
169-
padding: '1rem',
170-
...(typeof operatorImgStyle === 'object' ? operatorImgStyle : {}),
171-
'max-width': '12.5rem',
172-
},
173-
]"
157+
:style="operatorImgStyle"
174158
:src="operatorImgSrc"
175159
:alt="operatorImgAlt"
176160
>

0 commit comments

Comments
 (0)