Class: Playbook::PbRadio::Radio

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::FormTagHelper, Playbook::Props
Defined in:
app/pb_kits/playbook/pb_radio/radio.rb

Instance Method Summary collapse

Methods included from Playbook::Props

#dark_props, #generate_classname, #generate_classname_without_spacing, #initialize, #prop, #spacing_options, #spacing_props, #spacing_values

Instance Method Details

#body_statusObject



37
38
39
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 37

def body_status
  error ? "negative" : nil
end

#classnameObject



25
26
27
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 25

def classname
  generate_classname("pb_radio_kit") + error_class
end

#inputObject



29
30
31
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 29

def input
  check_box_tag(name, value, checked)
end

#selectedObject



33
34
35
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 33

def selected
  "checked" if checked == true
end