Skip to content

Commit

Permalink
feat: add ui for table (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpasquet authored Apr 16, 2024
1 parent 84f8e3d commit cb88676
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@eleven-labs/design-system",
"description": "Design System for Eleven Labs",
"version": "0.36.0",
"version": "0.37.0",
"repository": {
"type": "git",
"url": "https://github.com/eleven-labs/design-system.git"
Expand Down
25 changes: 25 additions & 0 deletions src/pages/PostPage/PostPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,30 @@ $headings-by-compoent-variant-name: (
transform: rotate(180deg);
}
}

table {
text-align: left;
width: 100%;

thead {
background-color: map-get-strict($token-variables, 'color', 'primary');
color: map-get-strict($token-variables, 'color', 'secondary');
}

th, td {
padding: map-get-strict($token-variables, 'spacing', 'xs');
border: 1px solid map-get-strict($token-variables, 'color', 'primary-very-dark');
}

tbody {
tr {
background-color: map-get-strict($token-variables, 'color', 'white');
}

tr + tr {
background-color: map-get-strict($token-variables, 'color', 'secondary-dark');
}
}
}
}
}
18 changes: 18 additions & 0 deletions src/pages/PostPage/PostPage.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,24 @@ const meta: Meta<typeof PostPage> = {
</li>
<li>Fourth item</li>
</ul>
<table>
<thead>
<tr>
<th>Syntax</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Header</td>
<td>Title</td>
</tr>
<tr>
<td>Paragraph</td>
<td>Text</td>
</tr>
</tbody>
</table>
</>
),
footer: PostFooterStories.args as PostPageProps['footer'],
Expand Down

0 comments on commit cb88676

Please sign in to comment.