feat(accordion): add "sm", "xl" size variants to Accordion and AccordionSkeleton

This commit is contained in:
Eric Liu 2020-10-15 15:48:48 -07:00
commit cb80c7d15b
7 changed files with 50 additions and 14 deletions

View file

@ -11,6 +11,12 @@
*/
export let align = "end";
/**
* Specify the size of the accordion
* @type {"sm" | "xl"} [size]
*/
export let size = undefined;
/**
* Set to `false` to close the first accordion item
* @type {boolean} [open=true]
@ -25,7 +31,9 @@
class:bx--accordion="{true}"
class:bx--skeleton="{true}"
{...$$restProps}
class="bx--accordion--{align} {$$restProps.class}"
class="bx--accordion--{align}
{size && `bx--accordion--${size}`}
{$$restProps.class}"
on:click
on:mouseover
on:mouseenter

View file

@ -7,7 +7,7 @@
/**
* Specify the size of the accordion
* @type {"sm" | "lg"} [size]
* @type {"sm" | "xl"} [size]
*/
export let size = undefined;
@ -24,6 +24,7 @@
<AccordionSkeleton
{...$$restProps}
align="{align}"
size="{size}"
on:click
on:mouseover
on:mouseenter