Skip to content
Snippets Groups Projects
Commit 899340fa authored by Kevin Genty's avatar Kevin Genty Committed by P. FONTANET
Browse files

feat(footer): retourner l'event linkSelect lors du clic sur un lien du footer

parent 49235fc9
No related branches found
No related tags found
No related merge requests found
# @edugouvfr/ngx-dsfr - Changelog
# 1.7.0
- feat(content): ajout de l'événement `linkSelect`
- feat(footer): ajout de l'évènement `mandatoryLinkSelect`
- feat(tabs): ajout de la propriété `fullViewport`, 100% largeur du viewport en mobile si vrai
- feat(tooltip): nouvelle directive
- feat(tooltip-button): nouveau composant
......
......@@ -84,7 +84,10 @@
<div class="fr-footer__bottom">
<ul class="fr-footer__bottom-list">
<li *ngFor="let item of mandatoryLinks" class="fr-footer__bottom-item">
<edu-item-link [item]="item" customClass="fr-footer__bottom-link"></edu-item-link>
<edu-item-link
[item]="item"
customClass="fr-footer__bottom-link"
(linkSelect)="onMandatoryLinkSelect($event)"></edu-item-link>
</li>
<li *ngIf="display" class="fr-footer__bottom-item">
<button
......
import { Component, Input, ViewEncapsulation } from '@angular/core';
import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { DsfrLink, I18nService } from '../../shared';
import { DISPLAY_MODAL_ID } from '../display';
import { DsfrAccessibility } from './accessibility.type';
......@@ -86,6 +86,9 @@ export class DsfrFooterComponent {
/** Mention de licence. */
@Input() license = 'Emplacement de la mention de licence - OBLIGATOIRE.';
/**Indique le lien mandatory séléctionné. */
@Output() mandatoryLinkSelect = new EventEmitter<string>();
/** @internal */
constructor(public i18n: I18nService) {}
......@@ -107,4 +110,8 @@ export class DsfrFooterComponent {
DsfrFooterComponent.DEF_MANDATORY_LINKS[0].label = labelAccessibility;
}
onMandatoryLinkSelect(link: string) {
this.mandatoryLinkSelect.emit(link);
}
}
......@@ -18,7 +18,7 @@ const meta: Meta = {
],
parameters: {
docs: { description: { component: descriptionMd } },
actions: false,
actions: { argTypesRegex: '^on.*' },
},
argTypes: {
accessibility: { control: { type: 'inline-radio' } },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment