Skip to content

Commit

Permalink
configure -> configureA11y
Browse files Browse the repository at this point in the history
  • Loading branch information
wuweiweiwu committed Mar 27, 2018
1 parent 0245949 commit 775d411
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions addons/a11y/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ storiesOf('button', module)
));
```

For more customizability. Use the `'configure'` function to configure [aXe options](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure).
For more customizability. Use the `'configureA11y'` function to configure [aXe options](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure).

```js
import React from 'react';
import { storiesOf } from '@storybook/react';

import { checkA11y, configure } from '@storybook/addon-a11y';
import { checkA11y, configureA11y } from '@storybook/addon-a11y';

const whateverOptionsYouWant = {};
configure(whateverOptionsYouWant);
configureA11y(whateverOptionsYouWant);

storiesOf('button', module)
.addDecorator(checkA11y)
Expand Down
4 changes: 2 additions & 2 deletions addons/a11y/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function checkA11y(storyFn, context) {
return manager.wrapStory(channel, storyFn, context, axeOptions);
}

function configure(options = {}) {
function configureA11y(options = {}) {
axeOptions = options;
}

export { checkA11y, shared, configure };
export { checkA11y, shared, configureA11y };

0 comments on commit 775d411

Please sign in to comment.