Class: Polaris::Popover::PaneComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/polaris/popover/pane_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(fixed: false, sectioned: false, **system_arguments) ⇒ PaneComponent

Returns a new instance of PaneComponent.



4
5
6
7
8
# File 'app/components/polaris/popover/pane_component.rb', line 4

def initialize(fixed: false, sectioned: false, **system_arguments)
  @fixed = fixed
  @sectioned = sectioned
  @system_arguments = system_arguments
end

Instance Method Details

#system_argumentsObject



10
11
12
13
14
15
16
17
18
19
# File 'app/components/polaris/popover/pane_component.rb', line 10

def system_arguments
  @system_arguments.tap do |opts|
    opts[:tag] = "div"
    opts[:classes] = class_names(
      @system_arguments[:classes],
      "Polaris-Popover__Pane",
      "Polaris-Popover__Pane--fixed": @fixed
    )
  end
end