diff --git a/packages/frontend/src/lib/Badge.spec.ts b/packages/frontend/src/lib/Badge.spec.ts index 7705a5b5e..c515aff99 100644 --- a/packages/frontend/src/lib/Badge.spec.ts +++ b/packages/frontend/src/lib/Badge.spec.ts @@ -27,14 +27,14 @@ test('print Badge with custom text and default background', async () => { const badgeContent = screen.getByText('custom-text'); expect(badgeContent).toBeInTheDocument(); - expect(badgeContent).toHaveClass('bg-charcoal-600'); + expect(badgeContent).toHaveClass('bg-[var(--pd-label-bg)]'); }); test('print Badge with custom text and custom background', async () => { - render(Badge, { icon: faTrash, content: 'custom-text', background: 'bg-charcoal-100' }); + render(Badge, { icon: faTrash, content: 'custom-text', background: 'bg-[var(--pd-label-text)]' }); const badgeContent = screen.getByText('custom-text'); expect(badgeContent).toBeInTheDocument(); - expect(badgeContent).toHaveClass('bg-charcoal-100'); - expect(badgeContent).not.toHaveClass('bg-charcoal-600'); + expect(badgeContent).toHaveClass('bg-[var(--pd-label-text)]'); + expect(badgeContent).not.toHaveClass('bg-[var(--pd-label-bg)]'); }); diff --git a/packages/frontend/src/lib/Badge.svelte b/packages/frontend/src/lib/Badge.svelte index 07d7ca25e..9bd71efe3 100644 --- a/packages/frontend/src/lib/Badge.svelte +++ b/packages/frontend/src/lib/Badge.svelte @@ -4,11 +4,11 @@ import Fa from 'svelte-fa'; export let icon: IconDefinition; export let content: string; -export let background: string = 'bg-charcoal-600'; +export let background: string = 'bg-[var(--pd-label-bg)]';
+ class="{background} rounded-md px-2 py-1 flex flex-row w-min h-min text-xs text-[var(--pd-label-text)] text-nowrap items-center"> {#if icon} {/if} diff --git a/packages/frontend/src/lib/icons/ModelWhite.svelte b/packages/frontend/src/lib/icons/ModelWhite.svelte index 872423f36..acdad4299 100644 --- a/packages/frontend/src/lib/icons/ModelWhite.svelte +++ b/packages/frontend/src/lib/icons/ModelWhite.svelte @@ -1,5 +1,6 @@