Class: Polaris::FormLayout::ItemComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::FormLayout::ItemComponent
- Defined in:
- app/components/polaris/form_layout/item_component.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(position:, **system_arguments) ⇒ ItemComponent
constructor
A new instance of ItemComponent.
Constructor Details
#initialize(position:, **system_arguments) ⇒ ItemComponent
Returns a new instance of ItemComponent.
4 5 6 7 8 9 10 11 12 13 |
# File 'app/components/polaris/form_layout/item_component.rb', line 4 def initialize(position:, **system_arguments) @position = position @system_arguments = system_arguments @system_arguments[:tag] = "div" @system_arguments[:classes] = class_names( @system_arguments[:classes], "Polaris-FormLayout__Item" ) end |
Instance Attribute Details
#position ⇒ Object (readonly)
Returns the value of attribute position.
2 3 4 |
# File 'app/components/polaris/form_layout/item_component.rb', line 2 def position @position end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'app/components/polaris/form_layout/item_component.rb', line 15 def call render(Polaris::BaseComponent.new(**@system_arguments)) { content } end |