demarches-normaliennes/app/javascript/controllers/dsfr_header_controller.ts
2022-09-21 15:47:35 +02:00

13 lines
369 B
TypeScript

import { ApplicationController } from './application_controller';
export class DSFRHeaderController extends ApplicationController {
static targets = ['notice'];
declare readonly noticeTarget: HTMLElement;
closeNotice() {
this.noticeTarget.parentNode?.removeChild(this.noticeTarget);
this.element.classList.remove('fr-header__with-notice-info');
}
}