Sha256: 451cb99e25453facd71666682144a0c192a8a897a20a5d1c664b3e13b5ecebb9
Contents?: true
Size: 492 Bytes
Versions: 25
Compression:
Stored size: 492 Bytes
Contents
module Coco class ConfirmPanel < Coco::Component renders_one :button, ->(**kwargs, &block) do coco_button(theme: :negative, **kwargs, fit: :full, size: :sm, &block) end renders_one :cancel, ->(**kwargs, &block) do coco_button(theme: :secondary, **kwargs, fit: :full, size: :sm, &block) end renders_one :text, Coco::Content before_render do unless button? raise ArgumentError, "No confirmation button defined" end end end end
Version data entries
25 entries across 25 versions & 1 rubygems