refactor(header/notice): convert JS to stimulus

This commit is contained in:
Colin Darie 2022-09-19 16:13:41 +02:00
parent a2c32b44c0
commit 55fd4307a1
5 changed files with 18 additions and 24 deletions

View file

@ -1,9 +1,9 @@
.fr-notice.fr-notice--info
.fr-notice.fr-notice--info{ "data-dsfr-header-target": "notice" }
.fr-container
.fr-notice__body
%p.fr-notice__title
= title
- if closable?
%button.fr-btn--close.fr-btn{ title: t('.close_notice'), onclick: 'javascript:DS.closeNoticeInfo(event)' }
%button.fr-btn--close.fr-btn{ title: t('.close_notice'), data: { action: "dsfr-header#closeNotice" } }
= t('.close_notice')