Sha256: b50025d18f476b67aa11a659df6a685a3c85453a3b6aba3dcfc9eb3493e0da79

Contents?: true

Size: 817 Bytes

Versions: 130

Compression:

Stored size: 817 Bytes

Contents

# frozen_string_literal: true

module NfgUi
  module Bootstrap
    module Components
      # Bootstrap Navbar Component
      # https://getbootstrap.com/docs/4.1/components/navbar/
      class NavbarToggler < NfgUi::Bootstrap::Components::Base
        include Bootstrap::Utilities::CollapseToggleable

        # Pass through to collapse component
        # def collapse
        #   options.fetch(:collapse, nil)
        # end

        def component_family
          :navbar
        end

        def render
          super do
            if body
              (block_given? ? yield : body)
            else
              content_tag(:span, nil, class: 'navbar-toggler-icon')
            end
          end
        end

        private

        def base_element
          :button
        end
      end
    end
  end
end

Version data entries

130 entries across 130 versions & 1 rubygems

Version Path
nfg_ui-6.17.2 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-6.17.1 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-6.17.0 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-6.16.3 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-6.16.2 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-6.16.1 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-6.16.0 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-5.15.7 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-5.15.6 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-5.15.5 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-5.15.4 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-5.15.3 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.15.2 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.15.1 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.15.0 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.14.7 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.14.6.3 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.14.6.2 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.14.6.1 lib/nfg_ui/bootstrap/components/navbar_toggler.rb
nfg_ui-0.14.6 lib/nfg_ui/bootstrap/components/navbar_toggler.rb