refactor(toggle): remove dispatch, inputRef, afterUpdate

This commit is contained in:
Eric Liu 2019-12-29 19:25:54 -08:00
commit 4b1ed0adce
5 changed files with 19 additions and 26 deletions

View file

@ -11,7 +11,7 @@
<div on:click on:mouseover on:mouseenter on:mouseleave class={cx('--form-item', className)} {style}>
<input type="checkbox" class={cx('--toggle --skeleton')} {id} />
<label
aria-label={labelText ? null : $$props['aria-label'] || 'Toggle is loading'}
aria-label={labelText ? undefined : $$props['aria-label'] || 'Toggle is loading'}
class={cx('--toggle__label', '--skeleton')}
for={id}>
{#if labelText}