refactor(components): remove exported "props"

Closes #17

- Forward events
- Adds style prop, removes exported props
This commit is contained in:
Eric Liu 2019-12-22 09:29:45 -08:00
commit 1286b9901d
31 changed files with 120 additions and 105 deletions

View file

@ -5,7 +5,7 @@
export let withOverlay = true;
export let small = false;
export let description = 'Active loading indicator';
export let props = {};
export let style = undefined;
import { cx } from '../../lib';
@ -23,11 +23,11 @@
{#if withOverlay}
<div class={_overlayClass}>
<div
{...props}
aria-atomic="true"
aria-labelledby={loadingId}
aria-live={active ? 'assertive' : 'off'}
class={_class}>
class={_class}
{style}>
<label id={loadingId} class={cx('--visually-hidden')}>{description}</label>
<svg class={cx('--loading__svg')} viewBox="-75 -75 150 150">
<title>{description}</title>
@ -40,11 +40,11 @@
</div>
{:else}
<div
{...props}
aria-atomic="true"
aria-labelledby={loadingId}
aria-live={active ? 'assertive' : 'off'}
class={_class}>
class={_class}
{style}>
<label id={loadingId} class={cx('--visually-hidden')}>{description}</label>
<svg class={cx('--loading__svg')} viewBox="-75 -75 150 150">
<title>{description}</title>