Module: Voom::Presenters::DSL::Components::Mixins::Toggles

Includes:
Append
Included in:
Form, Grid::Column, Common
Defined in:
lib/voom/presenters/dsl/components/mixins/toggles.rb

Instance Method Summary collapse

Methods included from Append

#<<, #yield_to

Instance Method Details

#checkbox(**attribs, &block) ⇒ Object



9
10
11
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 9

def checkbox(**attribs, &block)
  self << Checkbox.new(parent: self, **attribs, &block)
end

#icon_toggle(icon, **attribs, &block) ⇒ Object



23
24
25
26
27
28
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 23

def icon_toggle(icon, **attribs, &block)
  trace { attribs.inspect }
  self << IconToggle.new(parent: self,
                         icon: icon,
                         **attribs, &block)
end

#radio_button(**attribs, &block) ⇒ Object



13
14
15
16
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 13

def radio_button(**attribs, &block)
  self << RadioButton.new(parent: self,
                          **attribs, &block)
end

#switch(**attribs, &block) ⇒ Object



18
19
20
21
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 18

def switch(**attribs, &block)
  self << Switch.new(parent: self,
                     **attribs, &block)
end