Skip to content

Commit d6c28a8

Browse files
committed
story
1 parent 4ee54cc commit d6c28a8

1 file changed

Lines changed: 23 additions & 19 deletions

File tree

packages/ui-components/__design__/table.stories.tsx

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const tableData = [
66
['Data 1', 'Data 2', 'Data 3'],
77
];
88

9-
export const Table: StoryObj = {
9+
export const TableWithSubTableRow: StoryObj = {
1010
render: () => (
1111
<main>
1212
<table>
@@ -25,24 +25,28 @@ export const Table: StoryObj = {
2525
))}
2626
</tr>
2727
))}
28-
</tbody>
29-
</table>
30-
</main>
31-
),
32-
};
33-
34-
export const HeadlessTable: StoryObj = {
35-
render: () => (
36-
<main>
37-
<table>
38-
<tbody>
39-
{tableData.map((row, rowIndex) => (
40-
<tr key={rowIndex}>
41-
{row.map((cell, cellIndex) => (
42-
<td key={cellIndex}>{cell}</td>
43-
))}
44-
</tr>
45-
))}
28+
<tr>
29+
<td colSpan={3}>
30+
<table>
31+
<thead>
32+
<tr>
33+
<th>Sub 1</th>
34+
<th>Sub 2</th>
35+
</tr>
36+
</thead>
37+
<tbody>
38+
<tr>
39+
<td>Sub A</td>
40+
<td>Sub B</td>
41+
</tr>
42+
<tr>
43+
<td>Sub C</td>
44+
<td>Sub D</td>
45+
</tr>
46+
</tbody>
47+
</table>
48+
</td>
49+
</tr>
4650
</tbody>
4751
</table>
4852
</main>

0 commit comments

Comments
 (0)