Skip to content

Commit 0e4b4c7

Browse files
committed
test: fixed tests
Signed-off-by: Evzen Gasta <[email protected]>
1 parent 9fb41b3 commit 0e4b4c7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/frontend/src/lib/Badge.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test('print Badge with custom text and default background', async () => {
3131
});
3232

3333
test('print Badge with custom text and custom background', async () => {
34-
render(Badge, { icon: faTrash, content: 'custom-text', background: 'bg-[var(--pd-label-text)]' });
34+
render(Badge, { icon: faTrash, content: 'custom-text', class: 'bg-[var(--pd-label-text)]' });
3535

3636
const badgeContent = screen.getByText('custom-text');
3737
expect(badgeContent).toBeInTheDocument();

packages/frontend/src/lib/Badge.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ interface Props {
88
class?: string;
99
}
1010
11-
let { icon, content, class: classes = 'bg-[var(--pd-label-bg)]' }: Props = $props();
11+
let { icon, content, class: classes = 'bg-[var(--pd-label-bg)] text-[var(--pd-label-text)]' }: Props = $props();
1212
</script>
1313

14-
<div
15-
class="{classes} rounded-md px-2 py-1 flex flex-row w-min h-min text-[var(--pd-label-text)] text-nowrap items-center text-sm">
14+
<div class="{classes} rounded-md px-2 py-1 flex flex-row w-min h-min text-nowrap items-center text-sm">
1615
{#if icon}
1716
<Fa class="mr-2" icon={icon} />
1817
{/if}

0 commit comments

Comments
 (0)