From c401149b5a3e12c696c90341597914bc1451231b Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 5 Dec 2020 15:05:40 -0800 Subject: [PATCH] refactor(accordion): use the class name directive, resolve svelte icon paths --- COMPONENT_INDEX.md | 12 ++++++------ docs/src/COMPONENT_API.json | 2 +- src/Accordion/Accordion.svelte | 7 ++++--- src/Accordion/AccordionItem.svelte | 11 ++++++----- src/Accordion/AccordionSkeleton.svelte | 15 ++++++++------- types/Accordion/AccordionItem.d.ts | 2 +- 6 files changed, 26 insertions(+), 23 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 798a04f6..67be07a2 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -192,12 +192,12 @@ ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------------- | :--------------- | :------- | :------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| disabled | let | Yes | boolean | false | Set to `true` to disable the accordion item | -| open | let | Yes | boolean | false | Set to `true` to open the first accordion item | -| title | let | No | string | "title" | Specify the title of the accordion item heading
Alternatively, use the named slot "title" (e.g., <div slot="title">...</div>) | -| iconDescription | let | No | string | "Expand/Collapse" | Specify the ARIA label for the accordion item chevron icon | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------------- | :--------------- | :------- | :------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | +| disabled | let | Yes | boolean | false | Set to `true` to disable the accordion item | +| open | let | Yes | boolean | false | Set to `true` to open the first accordion item | +| title | let | No | string | "title" | Specify the title of the accordion item heading
Alternatively, use the "title" slot (e.g., <div slot="title">...</div>) | +| iconDescription | let | No | string | "Expand/Collapse" | Specify the ARIA label for the accordion item chevron icon | ### Slots diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 8da2e33d..39dc765f 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -191,7 +191,7 @@ { "name": "title", "kind": "let", - "description": "Specify the title of the accordion item heading\nAlternatively, use the named slot \"title\" (e.g.,
...
)", + "description": "Specify the title of the accordion item heading\nAlternatively, use the \"title\" slot (e.g.,
...
)", "type": "string", "value": "\"title\"", "isFunction": false, diff --git a/src/Accordion/Accordion.svelte b/src/Accordion/Accordion.svelte index ac6059a2..2cf3d63b 100644 --- a/src/Accordion/Accordion.svelte +++ b/src/Accordion/Accordion.svelte @@ -43,10 +43,11 @@ {:else}