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

Version Path
coveragebook_components-0.12.2 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.12.1 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.12.0 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.11.0 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.10.1.beta.2 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.10.1.beta.1 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.10.1.beta.0 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.10.0 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.9.1 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.9.0 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.9 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.8 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.7 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.6 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.5 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.4 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.3 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.2 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.1 app/components/coco/app/elements/confirm_panel/confirm_panel.rb
coveragebook_components-0.8.0 app/components/coco/app/elements/confirm_panel/confirm_panel.rb