class Bootstrap4RailsComponents::Bootstrap::Components::NavLink
Bootstrap
Nav
Component getbootstrap.com/docs/4.1/components/navs/
Public Instance Methods
component_family()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 13 def component_family :nav end
data()
click to toggle source
Calls superclass method
Bootstrap4RailsComponents::Bootstrap::Utilities::Remotable#data
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 29 def data tab ? super.merge!(toggle: 'tab') : super end
dropdown()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 17 def dropdown options.fetch(:dropdown, false) end
href()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 21 def href options.fetch(:href, nil) end
render() { |: body), as: :a, **html_options, theme: nil, nav_link: true| ... }
click to toggle source
Calls superclass method
Bootstrap4RailsComponents::Bootstrap::Components::Base#render
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 33 def render if dropdown Bootstrap4RailsComponents::Bootstrap::Components::DropdownToggle.new({ body: (block_given? ? yield : body), as: :a, **html_options, theme: nil, nav_link: true }, view_context).render else super end end
tab()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 25 def tab options.fetch(:tab, nil) end
Private Instance Methods
assistive_html_attributes()
click to toggle source
Calls superclass method
Bootstrap4RailsComponents::Bootstrap::Utilities::Disableable#assistive_html_attributes
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 55 def assistive_html_attributes return super unless tab { role: 'tab', aria: { controls: tab.tr('#', ''), selected: active } } end
base_element()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 43 def base_element :a end
component_css_class()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 47 def component_css_class 'nav-link' end
non_html_attribute_options()
click to toggle source
Calls superclass method
Bootstrap4RailsComponents::Bootstrap::Utilities::Remotable#non_html_attribute_options
# File lib/bootstrap4_rails_components/bootstrap/components/nav_link.rb, line 51 def non_html_attribute_options super.push(:tab, :dropdown) end