Class: UI::TableHeader
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::TableHeader
- Includes:
- TableHeaderBehavior
- Defined in:
- app/components/ui/table_header.rb
Instance Method Summary collapse
- #cell(classes: "", **attributes, &block) ⇒ Object
- #head(classes: "", **attributes, &block) ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ TableHeader
constructor
A new instance of TableHeader.
-
#row(classes: "", **attributes, &block) ⇒ Object
DSL methods.
- #view_template(&block) ⇒ Object
Methods included from TableHeaderBehavior
#header_classes, #header_html_attributes, #render_header
Constructor Details
#initialize(classes: "", **attributes) ⇒ TableHeader
Returns a new instance of TableHeader.
6 7 8 9 |
# File 'app/components/ui/table_header.rb', line 6 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#cell(classes: "", **attributes, &block) ⇒ Object
26 27 28 |
# File 'app/components/ui/table_header.rb', line 26 def cell(classes: "", **attributes, &block) render UI::TableCell.new(classes: classes, **attributes, &block) end |
#head(classes: "", **attributes, &block) ⇒ Object
22 23 24 |
# File 'app/components/ui/table_header.rb', line 22 def head(classes: "", **attributes, &block) render UI::TableHead.new(classes: classes, **attributes, &block) end |
#row(classes: "", **attributes, &block) ⇒ Object
DSL methods
18 19 20 |
# File 'app/components/ui/table_header.rb', line 18 def row(classes: "", **attributes, &block) render UI::TableRow.new(classes: classes, **attributes, &block) end |
#view_template(&block) ⇒ Object
11 12 13 14 15 |
# File 'app/components/ui/table_header.rb', line 11 def view_template(&block) thead(**header_html_attributes.deep_merge(@attributes)) do yield(self) if block_given? end end |