class Bootstrap4RailsComponents::Bootstrap::Components::NavbarNav

Bootstrap Navbar Component getbootstrap.com/docs/4.1/components/navbar/

Public Instance Methods

component_family() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 11
def component_family
  :navbar
end
left() click to toggle source

Left by default

# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 20
def left
  options.fetch(:left, default_left)
end
right() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 15
def right
  options.fetch(:right, false)
end

Private Instance Methods

base_element() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 26
def base_element
  as
end
css_classes() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 30
def css_classes
  [
    super,
    ('ml-auto' if right),
    ('mr-auto' if left)
  ].join(' ').squish
end
default_html_wrapper_element() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 38
def default_html_wrapper_element
  :ul
end
default_left() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/navbar_nav.rb, line 42
def default_left
  right ? false : true
end