Class: Tailwinds::Table::RowComponent
- Inherits:
-
Tramway::Component::Base
- Object
- ViewComponent::Base
- Tramway::Component::Base
- Tailwinds::Table::RowComponent
- Defined in:
- app/components/tailwinds/table/row_component.rb
Overview
Component for rendering a row in a table
Instance Method Summary collapse
Methods included from Tramway::Helpers::ComponentHelper
Instance Method Details
#row_tag(**options) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/components/tailwinds/table/row_component.rb', line 10 def row_tag(**, &) if href.present? klass = "#{[:class] || ''} cursor-pointer hover:bg-gray-700" link_to(href, .merge(class: klass)) do yield if block_given? end else tag.div(**) do yield if block_given? end end end |