Class: Polaris::IndexTable::CellComponent
- Inherits:
-
Component
- Object
- Component
- Polaris::IndexTable::CellComponent
- Defined in:
- app/components/polaris/index_table/cell_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(flush: false, **system_arguments) ⇒ CellComponent
constructor
A new instance of CellComponent.
- #system_arguments ⇒ Object
Constructor Details
#initialize(flush: false, **system_arguments) ⇒ CellComponent
Returns a new instance of CellComponent.
2 3 4 5 |
# File 'app/components/polaris/index_table/cell_component.rb', line 2 def initialize(flush: false, **system_arguments) @flush = flush @system_arguments = system_arguments end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 |
# File 'app/components/polaris/index_table/cell_component.rb', line 17 def call render(Polaris::BaseComponent.new(**system_arguments)) do content end end |
#system_arguments ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/components/polaris/index_table/cell_component.rb', line 7 def system_arguments {tag: "td"}.deep_merge(@system_arguments).tap do |args| args[:classes] = class_names( args[:classes], "Polaris-IndexTable__TableCell", "Polaris-IndexTable__TableCell--flush": @flush ) end end |