mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
docs(search): refactor "Expandable variant" to demonstrate reactivity
This commit is contained in:
parent
e066a65f42
commit
95a327f60d
2 changed files with 15 additions and 1 deletions
|
@ -26,7 +26,9 @@ The "clear" event is dispatched when clicking the "X" button or when pressing th
|
|||
|
||||
### Expandable variant
|
||||
|
||||
<Search expandable on:expand on:collapse />
|
||||
Set `expandable` to `true` to use the expandable variant.
|
||||
|
||||
<FileSource src="/framed/Search/SearchExpandableReactive" />
|
||||
|
||||
### Light variant
|
||||
|
||||
|
|
12
docs/src/pages/framed/Search/SearchExpandableReactive.svelte
Normal file
12
docs/src/pages/framed/Search/SearchExpandableReactive.svelte
Normal file
|
@ -0,0 +1,12 @@
|
|||
<script>
|
||||
import { Search } from "carbon-components-svelte";
|
||||
|
||||
let expanded = false;
|
||||
</script>
|
||||
|
||||
<Search expandable bind:expanded on:expand on:collapse />
|
||||
|
||||
<br />
|
||||
|
||||
<strong>Expanded:</strong>
|
||||
{expanded}
|
Loading…
Add table
Add a link
Reference in a new issue