mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor(toggle): remove dispatch, inputRef, afterUpdate
This commit is contained in:
parent
29c7c471c3
commit
4b1ed0adce
5 changed files with 19 additions and 26 deletions
|
@ -4,11 +4,17 @@
|
|||
import Layout from '../../internal/ui/Layout.svelte';
|
||||
import ToggleSmall from './ToggleSmall.svelte';
|
||||
import ToggleSmallSkeleton from './ToggleSmall.Skeleton.svelte';
|
||||
|
||||
let toggled = true;
|
||||
|
||||
$: {
|
||||
console.log('toggled', toggled);
|
||||
}
|
||||
</script>
|
||||
|
||||
<Layout>
|
||||
{#if story === 'toggled'}
|
||||
<ToggleSmall {...$$props} id="toggle-1" toggled />
|
||||
<ToggleSmall {...$$props} id="toggle-1" bind:toggled />
|
||||
{:else if story === 'skeleton'}
|
||||
<ToggleSmallSkeleton />
|
||||
{:else}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue