refactor(content-switcher): use class name directive

This commit is contained in:
Eric Liu 2020-12-05 15:15:12 -08:00
commit 3d5eed849c
5 changed files with 12 additions and 11 deletions

View file

@ -64,8 +64,9 @@
role="tablist"
class:bx--content-switcher="{true}"
class:bx--content-switcher--light="{light}"
class:bx--content-switcher--sm="{size === 'sm'}"
class:bx--content-switcher--xl="{size === 'xl'}"
{...$$restProps}
class="{size && `bx--content-switcher--${size}`} {$$restProps.class}"
on:click
on:mouseover
on:mouseenter

View file

@ -1,7 +1,7 @@
<script>
/**
* Specify the switch text
* Alternatively, use the named slot "text" (e.g., <span slot="text">...</span>)
* Alternatively, use the "text" slot (e.g., <span slot="text">...</span>)
*/
export let text = "Provide text";