Class: Playbook::PbSelectableIcon::SelectableIcon

Inherits:
Object
  • Object
show all
Includes:
Playbook::Props
Defined in:
app/pb_kits/playbook/pb_selectable_icon/selectable_icon.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

#additional_input_optionsObject



41
42
43
44
45
46
# File 'app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb', line 41

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

#classnameObject



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

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

#input_id_presentObject



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

def input_id_present
  input_id.present? ? input_id : name
end