app/components/coco/messaging/notice/notice.rb in coveragebook_components-0.17.5 vs app/components/coco/messaging/notice/notice.rb in coveragebook_components-0.17.6

- old
+ new

@@ -1,23 +1,23 @@ module Coco class Notice < Coco::Component include Concerns::AcceptsOptions include Concerns::WrapsComponent - accepts_option :dismissable, from: [true, false], default: true + accepts_option :dismissable, from: [true, false], default: false wraps_component :alert do |args| - Coco::Alert.new(**args, dismissable: get_option_value(:dismissable)) + Coco::Alert.new(**args, cloak: false, dismissable: get_option_value(:dismissable)) end %i[title action secondary_action link].each do |slot_name| renders_one slot_name, ->(*args, **kwargs, &block) do alert.send(:"with_#{slot_name}", *args, **kwargs, &block) end end before_render do - with_title { @title } unless title? + with_title { @title } unless title? || @title.nil? end def initialize(title: nil, **kwargs) @title = title end