docs(search): refactor "Expandable variant" to demonstrate reactivity

This commit is contained in:
metonym 2022-01-12 16:07:03 -10:00
commit 95a327f60d
2 changed files with 15 additions and 1 deletions

View file

@ -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

View 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}