class Voom::Presenters::DSL::Components::Card::Actions

Attributes

buttons[RW]
switches[RW]

Public Class Methods

new(**attribs_, &block) click to toggle source
# File lib/voom/presenters/dsl/components/card.rb, line 110
def initialize(**attribs_, &block)
  super(type: :action, **attribs_, &block)
  @buttons = []
  @switches = []
  expand!
end

Public Instance Methods

button(text = nil, **options, &block) click to toggle source
# File lib/voom/presenters/dsl/components/card.rb, line 117
def button(text = nil, **options, &block)
  @buttons << Components::Button.new(parent: self, text: text,
                                     **options, &block)
end
switch(text = nil, **options, &block) click to toggle source
# File lib/voom/presenters/dsl/components/card.rb, line 122
def switch(text = nil, **options, &block)
  @switches << Components::Switch.new(parent: self, text: text,
                                      **options, &block)
end