mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-19 03:49:34 +00:00
feat(search): support expandable variant
This commit is contained in:
parent
b3a63f20f5
commit
4aa11a1e98
5 changed files with 96 additions and 39 deletions
|
@ -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",
|
||||
|
|
|
@ -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 />
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue