Merge pull request #333 from IBM/accordion

Accordion: add size variants, disabled prop; forward align prop to Skeleton
This commit is contained in:
Eric Liu 2020-10-15 16:26:15 -07:00 committed by GitHub
commit f692403fcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 182 additions and 14 deletions

28
types/index.d.ts vendored
View file

@ -18,6 +18,17 @@ export class Accordion extends CarbonSvelteComponent {
*/
align?: "start" | "end";
/**
* Specify the size of the accordion
*/
size?: "sm" | "xl";
/**
* Set to `true` to disable the accordion
* @default false
*/
disabled?: boolean;
/**
* Set to `true` to display the skeleton state
* @default false
@ -43,6 +54,12 @@ export class AccordionItem extends CarbonSvelteComponent {
*/
open?: boolean;
/**
* Set to `true` to disable the accordion item
* @default false
*/
disabled?: boolean;
/**
* Specify the ARIA label for the accordion item chevron icon
* @default "Expand/Collapse"
@ -61,6 +78,17 @@ export class AccordionSkeleton extends CarbonSvelteComponent {
*/
count?: number;
/**
* Specify alignment of accordion item chevron icon
* @default "end"
*/
align?: "start" | "end";
/**
* Specify the size of the accordion
*/
size?: "sm" | "xl";
/**
* Set to `false` to close the first accordion item
* @default true