feat(ui-shell): support button tooltip in HeaderGlobalAction (#1894)

Closes #1893
This commit is contained in:
spburtsev 2024-03-08 06:37:58 +02:00 committed by GitHub
commit d8bc65163e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 92 additions and 90 deletions

View file

@ -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: {};
}
> {}

View file

@ -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: {} }
{}
> {}