feat(toggle): support small size, deprecate ToggleSmall

This commit is contained in:
Eric Liu 2020-11-19 15:20:01 -08:00
commit 1e3eef992c
12 changed files with 91 additions and 17 deletions

View file

@ -1,4 +1,10 @@
<script>
/**
* Specify the toggle size
* @type {"default" | "sm"}
*/
export let size = "default";
/** Set to `true` to toggle the checkbox input */
export let toggled = false;
@ -35,6 +41,7 @@
<input
type="checkbox"
class:bx--toggle-input="{true}"
class:bx--toggle-input--small="{size === 'sm'}"
checked="{toggled}"
on:change
on:change="{() => {