From 1c4ee0014249aad2883161a137277c25a305c5f9 Mon Sep 17 00:00:00 2001 From: metonym Date: Thu, 13 Oct 2022 22:04:32 -0700 Subject: [PATCH] fix(search): prop types should extend `input` attributes (#1523) Fixes #1520 --- docs/src/COMPONENT_API.json | 2 +- src/Search/Search.svelte | 1 + tests/Search.test.svelte | 2 +- types/Search/Search.svelte.d.ts | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 9272439b..afda19f9 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -10001,7 +10001,7 @@ { "type": "dispatched", "name": "clear", "detail": "null" } ], "typedefs": [], - "rest_props": { "type": "InlineComponent", "name": "SearchSkeleton" } + "rest_props": { "type": "Element", "name": "input" } }, { "moduleName": "SearchSkeleton", diff --git a/src/Search/Search.svelte b/src/Search/Search.svelte index 59bb8267..94f94d17 100644 --- a/src/Search/Search.svelte +++ b/src/Search/Search.svelte @@ -2,6 +2,7 @@ /** * @event {null} expand * @event {null} collapse + * @restProps {input} */ /** diff --git a/tests/Search.test.svelte b/tests/Search.test.svelte index 2ab64e0f..a3e0b65a 100644 --- a/tests/Search.test.svelte +++ b/tests/Search.test.svelte @@ -6,7 +6,7 @@ - + diff --git a/types/Search/Search.svelte.d.ts b/types/Search/Search.svelte.d.ts index fd23aab1..67cf50e9 100644 --- a/types/Search/Search.svelte.d.ts +++ b/types/Search/Search.svelte.d.ts @@ -1,7 +1,8 @@ /// import type { SvelteComponentTyped } from "svelte"; -export interface SearchProps { +export interface SearchProps + extends svelte.JSX.HTMLAttributes { /** * Specify the value of the search input * @default ""