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



35
36
37
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 35

def body_status
  error ? "negative" : nil
end

#classnameObject



27
28
29
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 27

def classname
  generate_classname("pb_radio_kit") + error_class
end

#selectedObject



31
32
33
# File 'app/pb_kits/playbook/pb_radio/radio.rb', line 31

def selected
  "checked" if checked == true
end