Table
(╯°□°)╯︵ ┻━┻
Includes a Ruby component and corresponding Rails helper
RubyHeader 1 | Header 2 | Header 3 |
---|---|---|
Row 1 | Row 1 | Row 1 |
Row 2 | Row 2 | Row 2 |
Row 3 | Row 3 | Row 3 |
Row 4 | Row 4 | Row 4 |
Row 5 | Row 5 | Row 5 |
<%= nk_table do |t| %>
<%= t.thead do %>
<%= t.th "Header" %>
<% end %>
<%= t.tbody do %>
<%= t.tr do %>
<%= t.td "Cell" %>
<% end %>
<% end %>
<% end %>
Usage
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <table> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <thead> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <tbody> element |
| ||
---|---|---|
Property | Default | Description |
**attrs | HTML attributes for <tr> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <th> element |
| ||
---|---|---|
Property | Default | Description |
text | nil | Plain text content |
**attrs | HTML attributes for <td> element |