Class: Shadcn::TableRowComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::TableRowComponent
- Defined in:
- app/components/shadcn/table_row_component.rb
Overview
Table Row component
Constant Summary collapse
- BASE_CLASSES =
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(selected: false, **options, &block) ⇒ TableRowComponent
constructor
A new instance of TableRowComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(selected: false, **options, &block) ⇒ TableRowComponent
Returns a new instance of TableRowComponent.
16 17 18 19 |
# File 'app/components/shadcn/table_row_component.rb', line 16 def initialize(selected: false, **, &block) super(**, &block) @selected = selected end |
Instance Method Details
#call ⇒ Object
21 22 23 |
# File 'app/components/shadcn/table_row_component.rb', line 21 def call content_tag(:tr, row_content, row_attributes) end |