feat(content-switcher): add "sm", "xl" size variants

This commit is contained in:
Eric Liu 2020-10-15 16:31:07 -07:00
commit 3edf9ea2a2
4 changed files with 34 additions and 5 deletions

View file

@ -11,6 +11,12 @@
*/
export let light = false;
/**
* Specify the size of the content switcher
* @type {"sm" | "xl"} [size]
*/
export let size = undefined;
import { afterUpdate, createEventDispatcher, setContext } from "svelte";
import { writable } from "svelte/store";
@ -61,6 +67,7 @@
class:bx--content-switcher="{true}"
class:bx--content-switcher--light="{light}"
{...$$restProps}
class="{size && `bx--content-switcher--${size}`} {$$restProps.class}"
on:click
on:mouseover
on:mouseenter