chore: mark preferred domain to new domain when closing notice
This commit is contained in:
parent
a16f88f8af
commit
2f4444bd5e
9 changed files with 41 additions and 5 deletions
|
@ -2,11 +2,18 @@
|
|||
class Dsfr::NoticeComponent < ApplicationComponent
|
||||
renders_one :title
|
||||
|
||||
def initialize(closable: false)
|
||||
attr_reader :data_attributes
|
||||
|
||||
def initialize(closable: false, data_attributes: {})
|
||||
@closable = closable
|
||||
@data_attributes = data_attributes
|
||||
end
|
||||
|
||||
def closable?
|
||||
!!@closable
|
||||
end
|
||||
|
||||
def notice_data_attributes
|
||||
{ "data-dsfr-header-target": "notice" }.merge(data_attributes)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue