Class: Playbook::PbSelectableIcon::SelectableIcon

Inherits:
KitBase
  • Object
show all
Defined in:
app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb

Instance Method Summary collapse

Methods inherited from KitBase

#object

Methods included from NumberSpacing

included

Methods included from ZIndex

included

Methods included from Spacing

included, #max_width_options, #max_width_props, #max_width_values, #spacing_options, #spacing_props, #spacing_values

Methods included from Classnames

#generate_classname, #generate_classname_without_spacing, included

Methods included from Playbook::Props

#initialize, #prop

Methods included from Playbook::PbKitHelper

#pb_rails

Methods included from Playbook::PbFormsHelper

#pb_form_with

Instance Method Details

#additional_input_optionsObject



37
38
39
40
41
42
# File 'app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb', line 37

def additional_input_options
  input_options.merge(
    id: input_id_present,
    disabled: disabled
  )
end

#classnameObject



29
30
31
# File 'app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb', line 29

def classname
  generate_classname("pb_selectable_icon_kit", checked_class, enabled_disabled_class)
end

#input_id_presentObject



33
34
35
# File 'app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb', line 33

def input_id_present
  input_id.present? ? input_id : name
end