refactor(tooltip): forward events, remove external props

Supports #7
This commit is contained in:
Eric Liu 2019-12-21 17:56:32 -08:00
commit b8a5d7bdcc
3 changed files with 6 additions and 8 deletions

View file

@ -5,7 +5,7 @@
export let align = 'center';
export let id = Math.random();
export let tooltipText = '';
export let props = {};
export let style = undefined;
import { cx } from '../../lib';
@ -19,13 +19,13 @@
</script>
<button
{...props}
on:click
on:mouseover
on:mouseenter
on:mouseleave
aria-describedby={id}
class={_class}
aria-describedby={id}>
{style}>
<span class={cx('--assistive-text')} {id}>{tooltipText}</span>
<slot />
</button>