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

#generate_classname, #initialize, #prop

Instance Method Details

#classnameObject



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

def classname
  generate_classname("pb_nav_list_kit_item", active_class)
end


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

def link_options
  options.merge(
    href: link
  )
end

#optionsObject



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

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

#tagObject



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

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