Class: Playbook::PbNav::Item

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

#classnameObject



17
18
19
# File 'app/pb_kits/playbook/pb_nav/item.rb', line 17

def classname
  generate_classname("pb_nav_list_kit_item", active_class)
end


31
32
33
34
35
# File 'app/pb_kits/playbook/pb_nav/item.rb', line 31

def link_options
  options.merge(
    href: link
  )
end

#optionsObject



25
26
27
28
29
# File 'app/pb_kits/playbook/pb_nav/item.rb', line 25

def options
  {
    class: "pb_nav_list_item_link",
  }.compact
end

#tagObject



21
22
23
# File 'app/pb_kits/playbook/pb_nav/item.rb', line 21

def tag
  link ? "a" : "div"
end