Skip to content

Commit 33ebb28

Browse files
committed
fix: add target to A component
1 parent e43944c commit 33ebb28

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib/typography/A.svelte

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
interface Props {
66
children: Snippet;
77
href: string;
8-
aclass?: string | undefined;
8+
target?: string;
9+
aclass?: string;
910
}
1011
11-
let { children, href = '#', aclass, ...attributes }: Props = $props();
12+
let { children, href = '#', target, aclass, ...attributes }: Props = $props();
1213
1314
const colorCls: string = 'text-primary-600 dark:text-primary-500';
1415
const aCls: string = 'inline-flex items-center hover:underline';
1516
</script>
1617

17-
<a {...attributes} {href} class={twMerge(aCls, colorCls, aclass)}>
18-
18+
<a {...attributes} {href} {target} class={twMerge(aCls, colorCls, aclass)}>
1919
{@render children()}
20-
2120
</a>
2221

2322
<!--

0 commit comments

Comments
 (0)