feat(search): support expandable variant

This commit is contained in:
Eric Y Liu 2021-05-02 15:00:49 -07:00
commit 4aa11a1e98
5 changed files with 96 additions and 39 deletions

View file

@ -7801,6 +7801,26 @@
"constant": false,
"reactive": false
},
{
"name": "expandable",
"kind": "let",
"description": "Set to `true` to enable the expandable variant",
"type": "boolean",
"value": "false",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "expanded",
"kind": "let",
"description": "Set to `true to expand the search input",
"type": "boolean",
"value": "false",
"isFunction": false,
"constant": false,
"reactive": true
},
{
"name": "value",
"kind": "let",
@ -7894,6 +7914,8 @@
],
"slots": [],
"events": [
{ "type": "dispatched", "name": "expand", "detail": "any" },
{ "type": "dispatched", "name": "collapse", "detail": "any" },
{ "type": "forwarded", "name": "click", "element": "SearchSkeleton" },
{
"type": "forwarded",

View file

@ -23,6 +23,10 @@ The "clear" event is dispatched when clicking the "X" button in the search input
<Search value="Cloud functions" on:clear={() => console.log('clear')}/>
### Expandable variant
<Search expandable on:expand on:collapse />
### Light variant
<Search light />
@ -35,7 +39,7 @@ The "clear" event is dispatched when clicking the "X" button in the search input
<Search size="sm" />
### Disabled
### Disabled state
<Search disabled />