mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat(toggle): support small size, deprecate ToggleSmall
This commit is contained in:
parent
b00e4316fd
commit
1e3eef992c
12 changed files with 91 additions and 17 deletions
|
@ -1,4 +1,10 @@
|
|||
<script>
|
||||
/**
|
||||
* Specify the toggle size
|
||||
* @type {"default" | "sm"}
|
||||
*/
|
||||
export let size = "default";
|
||||
|
||||
/** Specify the label text */
|
||||
export let labelText = "";
|
||||
|
||||
|
@ -18,6 +24,7 @@
|
|||
type="checkbox"
|
||||
id="{id}"
|
||||
class:bx--toggle="{true}"
|
||||
class:bx--toggle--small="{size === 'sm'}"
|
||||
class:bx--skeleton="{true}"
|
||||
/>
|
||||
<label
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue