mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
refactor(ui-shell): use $$restProps, remove cx
This commit is contained in:
parent
e886d772c7
commit
1e5333dd64
26 changed files with 230 additions and 425 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue