mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
feat(ui-shell): support button tooltip in HeaderGlobalAction
(#1894)
Closes #1893
This commit is contained in:
parent
0405edee7d
commit
d8bc65163e
8 changed files with 92 additions and 90 deletions
2
types/Button/Button.svelte.d.ts
vendored
2
types/Button/Button.svelte.d.ts
vendored
|
@ -41,6 +41,7 @@ export interface ButtonProps extends ButtonSkeletonProps, RestProps {
|
|||
|
||||
/**
|
||||
* Specify the icon to render
|
||||
* Alternatively, use the named slot "icon" (e.g., `<Icon slot="icon" size="{20}" />`)
|
||||
* @default undefined
|
||||
*/
|
||||
icon?: typeof import("svelte").SvelteComponent<any>;
|
||||
|
@ -132,5 +133,6 @@ export default class Button extends SvelteComponentTyped<
|
|||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
icon: {};
|
||||
}
|
||||
> {}
|
||||
|
|
12
types/UIShell/HeaderGlobalAction.svelte.d.ts
vendored
12
types/UIShell/HeaderGlobalAction.svelte.d.ts
vendored
|
@ -1,9 +1,7 @@
|
|||
import type { SvelteComponentTyped } from "svelte";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
import type { ButtonProps } from "../Button/Button.svelte";
|
||||
|
||||
type RestProps = SvelteHTMLElements["button"];
|
||||
|
||||
export interface HeaderGlobalActionProps extends RestProps {
|
||||
export interface HeaderGlobalActionProps extends ButtonProps {
|
||||
/**
|
||||
* Set to `true` to use the active variant
|
||||
* @default false
|
||||
|
@ -20,13 +18,11 @@ export interface HeaderGlobalActionProps extends RestProps {
|
|||
* Obtain a reference to the HTML button element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLButtonElement;
|
||||
|
||||
[key: `data-${string}`]: any;
|
||||
ref?: HTMLButtonElement;
|
||||
}
|
||||
|
||||
export default class HeaderGlobalAction extends SvelteComponentTyped<
|
||||
HeaderGlobalActionProps,
|
||||
{ click: WindowEventMap["click"] },
|
||||
{ default: {} }
|
||||
{}
|
||||
> {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue