From 3df61bd3be4b799d42ef05b67983da34dd74b4f6 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 5 Sep 2024 17:25:30 +0200 Subject: [PATCH] fix: badge and cell wrap --- v2/pink-sb/package.json | 2 +- v2/pink-sb/src/lib/Badge.svelte | 12 +++++++++--- v2/pink-sb/src/lib/table/Cell.svelte | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/v2/pink-sb/package.json b/v2/pink-sb/package.json index 28863949e2..19a4f171d9 100644 --- a/v2/pink-sb/package.json +++ b/v2/pink-sb/package.json @@ -1,6 +1,6 @@ { "name": "@appwrite.io/pink-svelte", - "version": "1.0.0-next.33", + "version": "1.0.0-next.34", "scripts": { "dev": "storybook dev -p 6006", "dev:package": "svelte-kit sync && svelte-package --watch", diff --git a/v2/pink-sb/src/lib/Badge.svelte b/v2/pink-sb/src/lib/Badge.svelte index d5a6e35152..538be8c3f1 100644 --- a/v2/pink-sb/src/lib/Badge.svelte +++ b/v2/pink-sb/src/lib/Badge.svelte @@ -4,7 +4,7 @@ type $$Props = HTMLAttributes & { content: string; } & Partial<{ - size: 'small' | 'medium'; + size: 'x-small' | 'small' | 'medium'; variant: 'primary' | 'secondary' | 'accent'; type: 'success' | 'warning' | 'error' | undefined; }>; @@ -68,8 +68,14 @@ font-family: var(--p-badge-font-family); font-size: var(--p-badge-font-size); font-style: normal; - font-weight: 500; - line-height: 140%; + font-weight: 400; + line-height: 130%; + + &.x-small { + --p-badge-font-size: var(--font-size-xs); + --p-badge-padding-block: var(--space-1); + --p-badge-padding-inline: var(--space-2); + } &.small { --p-badge-padding-block: var(--space-0); diff --git a/v2/pink-sb/src/lib/table/Cell.svelte b/v2/pink-sb/src/lib/table/Cell.svelte index c817eea223..5d9e52c80f 100644 --- a/v2/pink-sb/src/lib/table/Cell.svelte +++ b/v2/pink-sb/src/lib/table/Cell.svelte @@ -17,6 +17,8 @@ padding-block: var(--space-4); border-bottom: var(--border-width-s) solid var(--color-border-neutral); width: var(--p-cell-width); + min-width: 100%; + white-space: nowrap; > span { display: flex;