Sha256: 4be0b38b96138facaabdef9da7b300c405467c7687321025676fa621727cc346

Contents?: true

Size: 815 Bytes

Versions: 120

Compression:

Stored size: 815 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Alpha
    # Use `TabContainer` to create tabbed content with keyboard support. This component does not add any styles.
    # It only provides the tab functionality. If you want styled Tabs you can look at <%= link_to_component(Primer::Alpha::TabNav) %>.
    #
    # This component requires javascript.
    class TabContainer < Primer::Component
      # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
      def initialize(**system_arguments)
        @system_arguments = deny_tag_argument(**system_arguments)
        @system_arguments[:tag] = "tab-container"
      end

      def call
        render(Primer::BaseComponent.new(**@system_arguments)) { content }
      end

      def render?
        content.present?
      end
    end
  end
end

Version data entries

120 entries across 120 versions & 2 rubygems

Version Path
primer_view_components-0.36.5 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.52.2 app/components/primer/alpha/tab_container.rb
primer_view_components-0.36.4 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.52.1 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.52.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.36.3 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.51.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.36.2 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.50.1 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.50.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.36.1 app/components/primer/alpha/tab_container.rb
primer_view_components-0.36.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.49.2 app/components/primer/alpha/tab_container.rb
primer_view_components-0.35.2 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.49.1 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.49.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.35.1 app/components/primer/alpha/tab_container.rb
primer_view_components-0.35.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.48.2 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.48.1 app/components/primer/alpha/tab_container.rb