Skip to content

Commit 504426f

Browse files
authored
fix: #1864 add onclick to a tag (#1866)
1 parent 97ada80 commit 504426f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,4 +915,4 @@
915915
},
916916
"./package.json": "./package.json"
917917
}
918-
}
918+
}

src/lib/dropdown/DropdownItem.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<li class={li({ class: clsx(styling.li) })}>
2424
{#if href}
25-
<a {href} {...restProps} class={finalClass}>
25+
<a {href} {onclick} {...restProps} class={finalClass}>
2626
{@render children()}
2727
</a>
2828
{:else if onclick}

src/lib/dropdown/theme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export type DropdownItemVariants = VariantProps<typeof dropdownItem> & Classes<t
1717

1818
export const dropdownItem = tv({
1919
slots: {
20-
base: "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
21-
active: "block px-4 py-2 text-primary-700 dark:text-primary-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
20+
base: "block w-full text-left px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
21+
active: "block w-full text-left px-4 py-2 text-primary-700 dark:text-primary-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",
2222
li: ""
2323
}
2424
});

0 commit comments

Comments
 (0)