Class: Pulse::Layout::Sidebar
- Defined in:
- app/components/pulse/layout.rb
Overview
The layout's sidebar content.
Constant Summary collapse
- TAG_DEFAULT =
:div- TAG_OPTIONS =
[TAG_DEFAULT, :aside, :nav, :section].freeze
Constants inherited from Component
Constants included from AttributesHelper
AttributesHelper::PLURAL_ARIA_ATTRIBUTES, AttributesHelper::PLURAL_DATA_ATTRIBUTES
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(tag: TAG_DEFAULT, **system_arguments) ⇒ Sidebar
constructor
A new instance of Sidebar.
Methods inherited from Component
generate_id, #merge_attributes, #merge_classes
Methods included from SvgHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean
Methods included from AttributesHelper
#aria, #data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes
Constructor Details
#initialize(tag: TAG_DEFAULT, **system_arguments) ⇒ Sidebar
Returns a new instance of Sidebar.
125 126 127 128 129 130 131 132 133 134 |
# File 'app/components/pulse/layout.rb', line 125 def initialize(tag: TAG_DEFAULT, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, TAG_DEFAULT) @system_arguments[:classes] = merge_classes( 'pulse-col-[1]', @system_arguments[:classes] ) end |
Instance Method Details
#call ⇒ Object
136 137 138 |
# File 'app/components/pulse/layout.rb', line 136 def call render(Pulse::BaseComponent.new(**@system_arguments)) { content } end |