Allowing a custom placeholder in ToolbarSearch

This commit is contained in:
Flavio Li Volsi 2021-03-05 18:32:53 +01:00 committed by GitHub
commit cee26b7b38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,12 @@
*/
export let value = "";
/**
* Specify a custom placeholder
* @type {string}
*/
export let placeholder = "Search...";
/** Set to `true` to expand the search bar */
export let expanded = false;
@ -48,6 +54,7 @@
size="sm"
tabindex="{expanded ? tabindex : '-1'}"
disabled="{disabled}"
placeholder="{placeholder}"
{...$$restProps}
bind:ref
bind:value