-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addon-a11y: Remove deprecated withA11y decorator
- Loading branch information
Showing
2 changed files
with
9 additions
and
23 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
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 |
---|---|---|
@@ -1,27 +1,8 @@ | ||
/// <reference types="webpack-env" /> | ||
|
||
import type { AnyFramework, DecoratorFunction } from '@storybook/csf'; | ||
import deprecate from 'util-deprecate'; | ||
import { dedent } from 'ts-dedent'; | ||
|
||
export { PARAM_KEY } from './constants'; | ||
export * from './params'; | ||
|
||
if (module && module.hot && module.hot.decline) { | ||
module.hot.decline(); | ||
} | ||
|
||
export const withA11y: DecoratorFunction<AnyFramework> = deprecate( | ||
(storyFn, storyContext) => { | ||
return storyFn(storyContext); | ||
}, | ||
dedent` | ||
withA11y(options) is deprecated, please configure addon-a11y using the addParameter api: | ||
addParameters({ | ||
a11y: options, | ||
}); | ||
More at: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-witha11y-decorator | ||
` | ||
); |