Sha256: 58a6a4fafb3bc6837ae8bb7d39ce0edcf077a7db370e5341cd5f844563dbfccc
Contents?: true
Size: 595 Bytes
Versions: 48
Compression:
Stored size: 595 Bytes
Contents
module Coco module App module Elements 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 end end
Version data entries
48 entries across 48 versions & 1 rubygems