Class: Polaris::Stack::ItemComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::Stack::ItemComponent
- Defined in:
- app/components/polaris/stack/item_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(fill: false, **system_arguments) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
Constructor Details
#initialize(fill: false, **system_arguments) ⇒ ItemComponent
Returns a new instance of ItemComponent.
2 3 4 5 6 7 8 9 10 |
# File 'app/components/polaris/stack/item_component.rb', line 2 def initialize(fill: false, **system_arguments) @system_arguments = system_arguments @system_arguments[:tag] = "div" @system_arguments[:classes] = class_names( @system_arguments[:classes], "Polaris-LegacyStack__Item", "Polaris-LegacyStack__Item--fill": fill ) end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'app/components/polaris/stack/item_component.rb', line 12 def call render(Polaris::BaseComponent.new(**@system_arguments)) { content } end |