carbon-components-svelte/types/DataTable/ToolbarSearch.svelte.d.ts
Eric Liu 6de73f86fb
Refactor prop types to omit redundant null for null | HTMLElement types (#998)
* refactor: omit redundant `null` prop type for HTMLElements

* yarn build:lib

* test: assert updated element prop types
2022-01-12 13:36:47 -10:00

53 lines
1 KiB
TypeScript

/// <reference types="svelte" />
import { SvelteComponentTyped } from "svelte";
export interface ToolbarSearchProps
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["input"]> {
/**
* Specify the value of the search input
* @default ""
*/
value?: number | string;
/**
* Set to `true` to expand the search bar
* @default false
*/
expanded?: boolean;
/**
* Set to `true` to keep the search bar expanded
* @default false
*/
persistent?: boolean;
/**
* Set to `true` to disable the search bar
* @default false
*/
disabled?: boolean;
/**
* Specify the tabindex
* @default "0"
*/
tabindex?: string;
/**
* Obtain a reference to the input HTML element
* @default null
*/
ref?: HTMLInputElement;
}
export default class ToolbarSearch extends SvelteComponentTyped<
ToolbarSearchProps,
{
clear: WindowEventMap["clear"];
change: WindowEventMap["change"];
input: WindowEventMap["input"];
focus: WindowEventMap["focus"];
blur: WindowEventMap["blur"];
},
{}
> {}