Skip to content

Commit 9c9deff

Browse files
author
Mike Tobia
committed
fix: add default for sections
1 parent d55f82a commit 9c9deff

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/accordion/.size-snapshot.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@
1919
}
2020
},
2121
"index.cjs.js": {
22-
"bundled": 4499,
23-
"minified": 2290,
24-
"gzipped": 973
22+
"bundled": 4504,
23+
"minified": 2293,
24+
"gzipped": 975
2525
},
2626
"index.esm.js": {
27-
"bundled": 4358,
28-
"minified": 2150,
29-
"gzipped": 967,
27+
"bundled": 4363,
28+
"minified": 2153,
29+
"gzipped": 969,
3030
"treeshaked": {
3131
"rollup": {
3232
"code": 162,
3333
"import_statements": 83
3434
},
3535
"webpack": {
36-
"code": 2231
36+
"code": 2234
3737
}
3838
}
3939
}

packages/accordion/demo/accordion.stories.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import README from '../README.md';
4242
<Canvas>
4343
<Story
4444
name="Controlled"
45-
args={{ expandedSections: [sections[0]] }}
45+
args={{ expandedSections: SECTIONS.slice(0, 1) }}
4646
argTypes={{
4747
defaultExpandedSections: { control: false },
4848
collapsible: { control: false },

packages/accordion/src/useAccordion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { IUseAccordionProps, IUseAccordionReturnValue } from './types';
1717

1818
export function useAccordion<Value>({
1919
idPrefix,
20-
sections,
20+
sections = [],
2121
expandedSections,
2222
defaultExpandedSections,
2323
onChange = () => undefined,

0 commit comments

Comments
 (0)