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
openproject-primer_view_components-0.15.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.14.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.13.1 app/components/primer/alpha/tab_container.rb
primer_view_components-0.13.2 app/components/primer/alpha/tab_container.rb
primer_view_components-0.13.1 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.13.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.13.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.12.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.11.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.12.1 app/components/primer/alpha/tab_container.rb
primer_view_components-0.10.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.11.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.10.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.9.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.9.1 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.9.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.8.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.8.0 app/components/primer/alpha/tab_container.rb
primer_view_components-0.7.0 app/components/primer/alpha/tab_container.rb
openproject-primer_view_components-0.7.0 app/components/primer/alpha/tab_container.rb