Class: Fluxbit::TableGroupComponent

Inherits:
Component
  • Object
show all
Includes:
Config::TableComponent
Defined in:
app/components/fluxbit/table_group_component.rb

Instance Method Summary collapse

Methods inherited from Component

#add, #add_popover_or_tooltip, #anyicon, #element_name, #fx_id, #icon, #options, #popover?, #random_id, #remove_class, #remove_class_from_props, #render_popover_or_tooltip, #target, #tooltip?

Methods included from IconHelpers

#chevron_double_left, #chevron_double_right, #chevron_down, #chevron_left, #chevron_right, #chevron_up, #close_icon, #ellipsis_horizontal, #eye_icon, #eye_slash_icon, #plus_icon

Constructor Details

#initialize(**props) ⇒ TableGroupComponent

Returns a new instance of TableGroupComponent.



16
17
18
19
20
21
22
23
# File 'app/components/fluxbit/table_group_component.rb', line 16

def initialize(**props)
  super
  @props = props
  @as = @props.delete(:as) || :tr
  @cells_html = @props.delete(:cells_html) || { as: :td }

  @as_cells = @cells_html.delete(:as) || :td
end

Instance Method Details

#callObject



25
26
27
# File 'app/components/fluxbit/table_group_component.rb', line 25

def call
  tag.tr(safe_join(cells), **@props)
end