Skip to content

Commit

Permalink
Update Table.stories.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Sep 23, 2023
1 parent d888ed0 commit 97b27a7
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions stories/advanced/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ const TableList = forwardRef<
setHeaderHeight(headerRef.current.getBoundingClientRect().height);
}, []);

const baseThStyle: CSSProperties = {
color: "white",
background: "darkgray",
};
return (
<div {...attrs} ref={ref}>
<table
Expand All @@ -51,16 +47,18 @@ const TableList = forwardRef<
}}
>
<tr style={{ width: "100%" }}>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[0] }}>0</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[1] }}>1</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[2] }}>2</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[3] }}>3</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[4] }}>4</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[5] }}>5</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[6] }}>6</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[7] }}>7</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[8] }}>8</th>
<th style={{ ...baseThStyle, minWidth: COLUMN_WIDTHS[9] }}>9</th>
{COLUMN_WIDTHS.map((width, i) => (
<th
key={i}
style={{
color: "white",
background: "darkgray",
minWidth: width,
}}
>
{i}
</th>
))}
</tr>
</thead>
<tbody
Expand Down

0 comments on commit 97b27a7

Please sign in to comment.