Skip to content

Commit

Permalink
fix(#1466): apply padding when variant=relaxed
Browse files Browse the repository at this point in the history
  • Loading branch information
syedszeeshan authored and ArakTaiRoth committed Apr 24, 2024
1 parent df44721 commit c2dafaa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libs/web-components/src/assets/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ goa-table table {
border-collapse: collapse;
}

goa-table.relaxed td {
padding: 1rem;
}

goa-table.sticky thead {
position: sticky;
top: 0;
Expand All @@ -95,6 +91,10 @@ goa-table td {
border-bottom: 1px solid var(--goa-color-greyscale-200);
}

goa-table[variant=relaxed] td {
padding: 1.25rem 1rem 1rem 1rem;
}

goa-table thead th {
background-color: var(--goa-color-greyscale-white);
color: var(--goa-color-text-secondary);
Expand Down
9 changes: 7 additions & 2 deletions libs/web-components/src/components/table/Table.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<svelte:options customElement="goa-table" />
<svelte:options customElement={{
tag: "goa-table",
props: {
variant: { reflect: true }
}
}} />

<script lang="ts">
import { onMount, tick } from "svelte";
Expand Down Expand Up @@ -145,4 +150,4 @@
table {
border-collapse: collapse;
}
</style>
</style>

0 comments on commit c2dafaa

Please sign in to comment.