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



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

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

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



27
28
29
30
31
32
33
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 27

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

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



15
16
17
18
19
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 15

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

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



21
22
23
24
25
# File 'lib/voom/presenters/dsl/components/mixins/toggles.rb', line 21

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