Class: FoxTail::Dropdown::CheckboxItemComponent

Inherits:
InputItemComponent
  • Object
show all
Defined in:
app/components/fox_tail/dropdown/checkbox_item_component.rb

Instance Method Summary collapse

Instance Method Details

#idObject



6
7
8
# File 'app/components/fox_tail/dropdown/checkbox_item_component.rb', line 6

def id
  options[:id] ||= multiple? ? tag_id_for_value(checked_value) : tag_id
end

#input_classesObject



10
11
12
# File 'app/components/fox_tail/dropdown/checkbox_item_component.rb', line 10

def input_classes
  classnames super, theme.apply(:checkbox, self)
end

#input_contentObject



14
15
16
# File 'app/components/fox_tail/dropdown/checkbox_item_component.rb', line 14

def input_content
  render FoxTail::CheckboxComponent.new(options.merge(class: input_classes))
end