Sha256: 4f5d5f673a3fb340e8664ed267045bef25b3900211e289e0e3e55536fe7d59c0
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
# frozen_string_literal: true module Primer module Alpha class ActionList # Group heading rendered above the group contents. class Divider < Primer::Component DEFAULT_SCHEME = :subtle SCHEME_MAPPINGS = { DEFAULT_SCHEME => nil, :filled => "ActionList-sectionDivider--filled" }.freeze SCHEME_OPTIONS = SCHEME_MAPPINGS.keys.freeze # @param scheme [Symbol] Display a background color if scheme is `filled`. # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> def initialize(scheme: DEFAULT_SCHEME, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = :div @system_arguments[:role] = :separator @system_arguments[:'aria-hidden'] = true @scheme = fetch_or_fallback(SCHEME_OPTIONS, scheme, DEFAULT_SCHEME) @system_arguments[:classes] = class_names( "ActionList-sectionDivider", SCHEME_MAPPINGS[@scheme] ) end def call render(Primer::BaseComponent.new(**@system_arguments)) { "" } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
primer_view_components-0.1.1 | app/components/primer/alpha/action_list/divider.rb |