Skip to content

Commit

Permalink
Make requested changes to fix typos and reword unclear descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
catepalmer committed Jan 17, 2019
1 parent f44e1e5 commit b29202e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion demo/js/demo.tsx
Expand Up @@ -92,7 +92,10 @@ const Example = (): JSX.Element => (
<td>allowMultipleExpanded</td>
<td>Boolean</td>
<td>false</td>
<td>Open only one item at a time or not</td>
<td>
Don't close all the others when expanding an
AccordionItem
</td>
</tr>
<tr>
<td>onChange</td>
Expand Down
4 changes: 2 additions & 2 deletions src/AccordionContainer/AccordionContainer.spec.tsx
Expand Up @@ -122,7 +122,7 @@ describe('Accordion', () => {
);
});

it("adding an expanded item to an accordion that doesn't allow mutliple expansions closes other items", () => {
it("adding an expanded item to an accordion that doesn't allow multiple expansions closes other items", () => {
const mock = jest.fn(() => null);
const instance = mount(
<Provider
Expand Down Expand Up @@ -385,7 +385,7 @@ describe('Accordion', () => {
expect(console.error).toBeCalled();
});

it("triggers 'onChange' with uuid when accordion doesn't allow mutiple expansions", () => {
it("triggers 'onChange' with uuid when accordion doesn't allow multiple expansions", () => {
const onChange = jest.fn();
const item = {
...DEFAULT_ITEM,
Expand Down
1 change: 0 additions & 1 deletion src/AccordionContainer/AccordionContainer.tsx
Expand Up @@ -81,7 +81,6 @@ export class Provider extends React.Component<ProviderProps, ProviderState> {
);
}
if (!this.props.allowMultipleExpanded && newItem.expanded) {
// If this is a true accordion that doesn't allow multiple expansions and the new item is expanded, then the others must be closed.
items = [
...state.items.map((item: Item) => ({
...item,
Expand Down

0 comments on commit b29202e

Please sign in to comment.