refactor(ui-shell): use $$restProps, remove cx

This commit is contained in:
Eric Liu 2020-07-19 06:33:06 -07:00
commit 1e5333dd64
26 changed files with 230 additions and 425 deletions

View file

@ -1,14 +1,15 @@
<script>
export let href = undefined;
export let text = undefined;
import { cx } from '../../../lib';
</script>
<li>
<a
class={cx('--header__menu-item')}
role="menuitem"
tabindex="0"
{href}
class:bx--header__menu-item={true}
{...$$restProps}
on:click
on:mouseover
on:mouseenter
@ -16,8 +17,7 @@
on:keyup
on:keydown
on:focus
on:blur
{href}>
<span class={cx('--text-truncate--end')}>{text}</span>
on:blur>
<span class:bx--text-truncate--end={true}>{text}</span>
</a>
</li>