Class: Polaris::Navigation::SectionComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::Navigation::SectionComponent
- Defined in:
- app/components/polaris/navigation/section_component.rb
Defined Under Namespace
Classes: ActionComponent
Instance Method Summary collapse
-
#initialize(title: nil, separator: false, fill: false, **system_arguments) ⇒ SectionComponent
constructor
A new instance of SectionComponent.
- #system_arguments ⇒ Object
Constructor Details
#initialize(title: nil, separator: false, fill: false, **system_arguments) ⇒ SectionComponent
Returns a new instance of SectionComponent.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/components/polaris/navigation/section_component.rb', line 5 def initialize( title: nil, separator: false, fill: false, **system_arguments ) @title = title @separator = separator @fill = fill @system_arguments = system_arguments end |
Instance Method Details
#system_arguments ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/components/polaris/navigation/section_component.rb', line 17 def system_arguments @system_arguments.tap do |opts| opts[:tag] = "ul" opts[:classes] = class_names( @system_arguments[:classes], "Polaris-Navigation__Section", "Polaris-Navigation__Section--fill": @fill, "Polaris-Navigation__Section--withSeparator": @separator ) end end |