Class: Polaris::FormLayout::GroupComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::FormLayout::GroupComponent
- Defined in:
- app/components/polaris/form_layout/group_component.rb
Defined Under Namespace
Classes: GroupItemComponent
Instance Attribute Summary collapse
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(position:, condensed: false, wrapper_arguments: {}, **system_arguments) ⇒ GroupComponent
constructor
A new instance of GroupComponent.
Constructor Details
#initialize(position:, condensed: false, wrapper_arguments: {}, **system_arguments) ⇒ GroupComponent
Returns a new instance of GroupComponent.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/components/polaris/form_layout/group_component.rb', line 6 def initialize(position:, condensed: false, wrapper_arguments: {}, **system_arguments) @position = position @system_arguments = system_arguments @system_arguments[:tag] = "div" @system_arguments[:classes] = class_names( @system_arguments[:classes], "Polaris-FormLayout__Items" ) @wrapper_arguments = wrapper_arguments @wrapper_arguments[:tag] = "div" @wrapper_arguments[:role] = "group" @wrapper_arguments[:classes] = class_names( "Polaris-FormLayout--grouped": !condensed, "Polaris-FormLayout--condensed": condensed ) end |
Instance Attribute Details
#position ⇒ Object (readonly)
Returns the value of attribute position.
2 3 4 |
# File 'app/components/polaris/form_layout/group_component.rb', line 2 def position @position end |