diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 3c857b7f..40a5a740 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1667,7 +1667,7 @@ None. | Prop name | Required | Kind | Reactive | Type | Default value | Description | | :-------- | :------- | :--------------- | :------- | --------------------------------------------------------- | ---------------------- | --------------------------------------------- | -| ref | No | let | Yes | -- | null | Obtain a reference to the HTML button element | +| ref | No | let | Yes | HTMLButtonElement | null | Obtain a reference to the HTML button element | | isActive | No | let | No | boolean | false | Set to `true` to use the active variant | | icon | No | let | No | typeof import("svelte").SvelteComponent | undefined | Specify the icon to render | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 3b402acc..541b9640 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -5104,6 +5104,7 @@ "name": "ref", "kind": "let", "description": "Obtain a reference to the HTML button element", + "type": "HTMLButtonElement", "value": "null", "isFunction": false, "isFunctionDeclaration": false, diff --git a/src/UIShell/HeaderGlobalAction.svelte b/src/UIShell/HeaderGlobalAction.svelte index 06b16f73..13e220ee 100644 --- a/src/UIShell/HeaderGlobalAction.svelte +++ b/src/UIShell/HeaderGlobalAction.svelte @@ -12,7 +12,9 @@ */ export let icon = undefined; - /** Obtain a reference to the HTML button element */ + /** Obtain a reference to the HTML button element + * @type {HTMLButtonElement} + */ export let ref = null; import Button from "../Button/Button.svelte"; diff --git a/types/UIShell/HeaderGlobalAction.svelte.d.ts b/types/UIShell/HeaderGlobalAction.svelte.d.ts index 4dfaa836..36923a55 100644 --- a/types/UIShell/HeaderGlobalAction.svelte.d.ts +++ b/types/UIShell/HeaderGlobalAction.svelte.d.ts @@ -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,7 +18,7 @@ export interface HeaderGlobalActionProps extends RestProps { * Obtain a reference to the HTML button element * @default null */ - ref?: undefined; + ref?: HTMLButtonElement; } export default class HeaderGlobalAction extends SvelteComponentTyped<