Class: Polaris::ActionList::SectionComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/polaris/action_list/section_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(position: 1, multiple_sections: false, title: nil, **system_arguments) ⇒ SectionComponent

Returns a new instance of SectionComponent.



4
5
6
7
8
9
10
11
12
13
14
# File 'app/components/polaris/action_list/section_component.rb', line 4

def initialize(
  position: 1,
  multiple_sections: false,
  title: nil,
  **system_arguments
)
  @position = position
  @multiple_sections = multiple_sections
  @title = title
  @system_arguments = system_arguments
end

Instance Method Details

#system_argumentsObject



16
17
18
19
20
# File 'app/components/polaris/action_list/section_component.rb', line 16

def system_arguments
  @system_arguments.tap do |opts|
    opts[:tag] = "div"
  end
end