Class: Playbook::PbCheckbox::Checkbox
- Inherits:
-
Object
- Object
- Playbook::PbCheckbox::Checkbox
show all
- Includes:
- ActionView::Context, ActionView::Helpers::FormTagHelper, Playbook::Props
- Defined in:
- app/pb_kits/playbook/pb_checkbox/checkbox.rb
Instance Method Summary
collapse
#dark_props, #generate_classname, #generate_classname_without_spacing, #initialize, #prop, #spacing_options, #spacing_props, #spacing_values
Instance Method Details
#checkbox_label_status ⇒ Object
37
38
39
|
# File 'app/pb_kits/playbook/pb_checkbox/checkbox.rb', line 37
def checkbox_label_status
error ? "negative" : nil
end
|
#checked_html ⇒ Object
25
26
27
|
# File 'app/pb_kits/playbook/pb_checkbox/checkbox.rb', line 25
def checked_html
checked ? "checked='true'" : nil
end
|
#classname ⇒ Object
29
30
31
|
# File 'app/pb_kits/playbook/pb_checkbox/checkbox.rb', line 29
def classname
generate_classname("pb_checkbox_kit", checked_class) + error_class
end
|
33
34
35
|
# File 'app/pb_kits/playbook/pb_checkbox/checkbox.rb', line 33
def input
check_box_tag(name, value, checked, input_options)
end
|