diff --git a/web/src/lib/components/settings/SettingsList.svelte b/web/src/lib/components/settings/SettingsList.svelte index 0e0e5977..8471ac61 100644 --- a/web/src/lib/components/settings/SettingsList.svelte +++ b/web/src/lib/components/settings/SettingsList.svelte @@ -2,27 +2,19 @@ import { tv, type VariantProps } from "tailwind-variants"; export const settingsList = tv({ - base: "flex w-full flex-col divide-y divide-border-default rounded-sm border border-border-default", + // Figma lays these cards out as [row, separator, row] with an 8px gap, so every + // row carries 8px of its own padding and divide-y draws the hairline between two + // of them — the line ends up centred in the space rather than flush against the + // row above. That leaves py-1 for the card itself, which is the rest of the 12px + // Figma puts between the card edge and the first row. + base: "flex w-full flex-col divide-y divide-border-default rounded-sm border border-border-default py-1 [&>*]:py-2", variants: { - // Figma spaces rows with a gap and drops the hairline in the middle of it, - // so each row carries half the gap as its own padding and divide-y draws the - // line between the two halves — that way the divider is split evenly across - // the rows it separates rather than sitting flush against one of them. The - // card's own vertical padding is whatever is left of 12px once a row's half - // is counted, which is why it lives here rather than in `padding`. Named in - // Tailwind spacing units because the designs use all three of 8 / 12 / 16px. - gap: { - "2": "py-2 [&>*]:py-1", - "3": "py-1.5 [&>*]:py-1.5", - "4": "py-1 [&>*]:py-2" - }, padding: { default: "px-4", tight: "px-3" } }, defaultVariants: { - gap: "4", padding: "default" } }); @@ -34,15 +26,14 @@ import type { Snippet } from "svelte"; interface Props { - gap?: SettingsListVariants["gap"]; padding?: SettingsListVariants["padding"]; class?: string; children: Snippet; } - let { gap = "4", padding = "default", class: className, children }: Props = $props(); + let { padding = "default", class: className, children }: Props = $props(); - const classes = $derived(settingsList({ gap, padding, class: className })); + const classes = $derived(settingsList({ padding, class: className }));
diff --git a/web/src/lib/components/settings/SettingsPanel.stories.svelte b/web/src/lib/components/settings/SettingsPanel.stories.svelte index 9d353f9c..61069723 100644 --- a/web/src/lib/components/settings/SettingsPanel.stories.svelte +++ b/web/src/lib/components/settings/SettingsPanel.stories.svelte @@ -94,7 +94,7 @@ {#snippet action()} {/snippet} - + {#snippet label()} diff --git a/web/src/lib/components/settings/SettingsSection.svelte b/web/src/lib/components/settings/SettingsSection.svelte index e51c4750..cbd26447 100644 --- a/web/src/lib/components/settings/SettingsSection.svelte +++ b/web/src/lib/components/settings/SettingsSection.svelte @@ -1,21 +1,18 @@ @@ -25,7 +22,7 @@

{title}

{/if} {#if framed} - + {@render children()} {:else} diff --git a/web/src/routes/[handle]/[repo]/settings/+page.svelte b/web/src/routes/[handle]/[repo]/settings/+page.svelte index 7f4c3d51..227f279d 100644 --- a/web/src/routes/[handle]/[repo]/settings/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/+page.svelte @@ -76,7 +76,7 @@
- + - + Unsubscribe all {/snippet} - + {#each labels as item (item.name)} {#snippet label()} @@ -164,7 +164,7 @@
- + diff --git a/web/src/routes/[handle]/[repo]/settings/access/+page.svelte b/web/src/routes/[handle]/[repo]/settings/access/+page.svelte index 46db283e..ecf8612e 100644 --- a/web/src/routes/[handle]/[repo]/settings/access/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/access/+page.svelte @@ -46,7 +46,7 @@ {/snippet} - + {#each collaborators as person (person.handle)} {#snippet label()} diff --git a/web/src/routes/[handle]/[repo]/settings/hooks/+page.svelte b/web/src/routes/[handle]/[repo]/settings/hooks/+page.svelte index 1c788d8b..53f0bc77 100644 --- a/web/src/routes/[handle]/[repo]/settings/hooks/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/hooks/+page.svelte @@ -61,7 +61,7 @@ {#if hooks.length === 0} {:else} - + {#each hooks as hook (hook.id)}