Class: Bootstrap4RailsComponents::Bootstrap::Components::NavLink
Overview
Instance Attribute Summary
#as
Attributes inherited from Base
#body, #options, #view_context
Instance Method Summary
collapse
#remote
#disabled
#active
Methods inherited from Base
#component_initialize, #html_options, #id, #initialize, #style, #utility_initialize
Instance Method Details
#component_family ⇒ Object
13
14
15
|
# File 'lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb', line 13
def component_family
:nav
end
|
#data ⇒ Object
29
30
31
|
# File 'lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb', line 29
def data
tab ? super.merge!(toggle: 'tab') : super
end
|
#dropdown ⇒ Object
17
18
19
|
# File 'lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb', line 17
def dropdown
options.fetch(:dropdown, false)
end
|
#href ⇒ Object
21
22
23
|
# File 'lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb', line 21
def href
options.fetch(:href, nil)
end
|
#tab ⇒ Object
25
26
27
|
# File 'lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb', line 25
def tab
options.fetch(:tab, nil)
end
|