mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
22 lines
419 B
Svelte
22 lines
419 B
Svelte
<script lang="ts">
|
|
import { Search } from "carbon-components-svelte";
|
|
|
|
let expanded = false;
|
|
let value = "";
|
|
</script>
|
|
|
|
<Search
|
|
bind:expanded
|
|
bind:value
|
|
expandable
|
|
labelText="Expandable search"
|
|
placeholder="Search expandable..."
|
|
on:expand={() => {
|
|
console.log("expanded");
|
|
}}
|
|
on:collapse={() => {
|
|
console.log("collapsed");
|
|
}}
|
|
/>
|
|
|
|
<div>Status: {expanded ? "expanded" : "collapsed"}</div>
|