Class: Polaris::Popover::SectionComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::Popover::SectionComponent
- Defined in:
- app/components/polaris/popover/section_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**system_arguments) ⇒ SectionComponent
constructor
A new instance of SectionComponent.
- #system_arguments ⇒ Object
Constructor Details
#initialize(**system_arguments) ⇒ SectionComponent
Returns a new instance of SectionComponent.
2 3 4 |
# File 'app/components/polaris/popover/section_component.rb', line 2 def initialize(**system_arguments) @system_arguments = system_arguments end |
Instance Method Details
#call ⇒ Object
16 17 18 19 20 21 22 |
# File 'app/components/polaris/popover/section_component.rb', line 16 def call render(Polaris::BaseComponent.new(**system_arguments)) do render(Polaris::BoxComponent.new(padding: "2")) do content end end end |
#system_arguments ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'app/components/polaris/popover/section_component.rb', line 6 def system_arguments @system_arguments.tap do |opts| opts[:tag] = "div" opts[:classes] = class_names( @system_arguments[:classes], "Polaris-Popover__Section" ) end end |