Sha256: 9c0459227c4f743f9f22d1ba28233eccfd863df2427ff872327f6288d63cea71
Contents?: true
Size: 526 Bytes
Versions: 35
Compression:
Stored size: 526 Bytes
Contents
module Coco class ModalDialog < Coco::Component include Concerns::AcceptsOptions accepts_option :dismissable, from: [true, false], default: true renders_one :title before_render do unless title? raise ArgumentError, "A title is required for modal dialogs" end end def initialize(**kwargs) title { kwargs[:title] } if kwargs[:title] end def header? title || dismissable? end def dismissable? get_option_value(:dismissable) end end end
Version data entries
35 entries across 35 versions & 1 rubygems