-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Accordion): ability to open multiple items (#988)
* Add ability for activeIndex in Accordions to be an array Allowing multiple open panels at once, need help with transforming activeIndex prop to an array. * feat(Accordion): ability to open multiple items * docs(Accordion): add missing period * fix(Accordion): remove redundant defaultActiveIndex logic * refactor(Accordion): consolidate active index checks * test(Accordion): fix exclusive test, use array defaultActiveIndex * test(Accordion): silence console for known prop type warning * docs(ExampleSection): add whitespace to bottom of page * test(Accordion): add inclusive tests for opening and closing panels (#1023) test(Accordion): add inclusive tests for opening and closing panels
- Loading branch information
1 parent
609847d
commit c7f5dc8
Showing
5 changed files
with
159 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
docs/app/Examples/modules/Accordion/Variations/AccordionExampleExclusive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import _ from 'lodash' | ||
import faker from 'faker' | ||
import React from 'react' | ||
import { Accordion } from 'semantic-ui-react' | ||
|
||
const panels = _.times(3, () => ({ | ||
title: faker.lorem.sentence(), | ||
content: faker.lorem.paragraphs(), | ||
})) | ||
|
||
const AccordionExampleExclusive = () => ( | ||
<Accordion panels={panels} exclusive={false} fluid /> | ||
) | ||
|
||
export default AccordionExampleExclusive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters