Skip to content

Commit 3401787

Browse files
authored
chore: template simplification (#104)
we obviously only need the condition around the table cell head element
1 parent f6a7ec6 commit 3401787

File tree

1 file changed

+7
-17
lines changed
  • source/_patterns/02-components/table

1 file changed

+7
-17
lines changed

source/_patterns/02-components/table/table.hbs

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,12 @@
1616
</tr>
1717
</thead>
1818
<tbody{{#if align}} data-align="{{ align }}"{{/if }}{{#if vertical-align}} data-vertical-align="{{ vertical-align }}"{{/if }}>
19-
{{! TODO: Not elegant, but working for the moment… }}
20-
{{#if rowtitle }}
21-
{{#each cells }}
22-
<tr>
23-
<th scope="row">table header</th>
24-
<td{{#if @first }}{{#if ../icon}} data-icon="{{ ../icon }}"{{/if }}{{/if }}>{{{ text01 }}}</td>
25-
<td>{{{ text02 }}}</td>
26-
</tr>
27-
{{/each }}
28-
{{else}}
29-
{{#each cells }}
30-
<tr>
31-
<td{{#if @first }}{{#if ../icon}} data-icon="{{ ../icon }}"{{/if }}{{/if }}>{{{ text01 }}}</td>
32-
<td>{{{ text02 }}}</td>
33-
</tr>
34-
{{/each }}
35-
{{/if }}
19+
{{#each cells }}
20+
<tr>
21+
{{#if ../rowtitle }}<th scope="row">table header</th>{{/if }}
22+
<td{{#if @first }}{{#if ../icon}} data-icon="{{ ../icon }}"{{/if }}{{/if }}>{{{ text01 }}}</td>
23+
<td>{{{ text02 }}}</td>
24+
</tr>
25+
{{/each }}
3626
</tbody>
3727
</table>

0 commit comments

Comments
 (0)