mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
feat(accordion): add "sm", "xl" size variants to Accordion and AccordionSkeleton
This commit is contained in:
parent
933055c9ce
commit
cb80c7d15b
7 changed files with 50 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue