mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(ui-shell): forward click
event to HeaderActionLink
(#1797)
Closes #1796
This commit is contained in:
parent
a1c7d9bd7c
commit
e5675eb203
4 changed files with 6 additions and 3 deletions
|
@ -1652,7 +1652,9 @@ None.
|
|||
|
||||
### Events
|
||||
|
||||
None.
|
||||
| Event name | Type | Detail |
|
||||
| :--------- | :-------- | :----- |
|
||||
| click | forwarded | -- |
|
||||
|
||||
## `HeaderGlobalAction`
|
||||
|
||||
|
|
|
@ -5064,7 +5064,7 @@
|
|||
"slot_props": "{}"
|
||||
}
|
||||
],
|
||||
"events": [],
|
||||
"events": [{ "type": "forwarded", "name": "click", "element": "a" }],
|
||||
"typedefs": [],
|
||||
"rest_props": { "type": "Element", "name": "a" }
|
||||
},
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
href="{href}"
|
||||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||
{...$$restProps}
|
||||
on:click
|
||||
>
|
||||
<slot name="icon">
|
||||
<svelte:component this="{icon}" size="{20}" />
|
||||
|
|
2
types/UIShell/HeaderActionLink.svelte.d.ts
vendored
2
types/UIShell/HeaderActionLink.svelte.d.ts
vendored
|
@ -33,6 +33,6 @@ export interface HeaderActionLinkProps extends RestProps {
|
|||
|
||||
export default class HeaderActionLink extends SvelteComponentTyped<
|
||||
HeaderActionLinkProps,
|
||||
Record<string, any>,
|
||||
{ click: WindowEventMap["click"] },
|
||||
{ icon: {} }
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue