Class: Polaris::Stack::ItemComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/polaris/stack/item_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(fill: false, **system_arguments) ⇒ ItemComponent

Returns a new instance of ItemComponent.



2
3
4
5
6
7
8
9
10
# File 'app/components/polaris/stack/item_component.rb', line 2

def initialize(fill: false, **system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] = "div"
  @system_arguments[:classes] = class_names(
    @system_arguments[:classes],
    "Polaris-LegacyStack__Item",
    "Polaris-LegacyStack__Item--fill": fill
  )
end

Instance Method Details

#callObject



12
13
14
# File 'app/components/polaris/stack/item_component.rb', line 12

def call
  render(Polaris::BaseComponent.new(**@system_arguments)) { content }
end