-
-
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.
Merge pull request #9951 from jonspalmer/remove_deprecated_addon_deco…
…rators Remove deprecated decorators and loaders
- Loading branch information
Showing
18 changed files
with
42 additions
and
125 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
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,3 +1,3 @@ | ||
import { withA11Y } from '../index'; | ||
import { withA11y } from '../index'; | ||
|
||
export const decorators = [withA11Y]; | ||
export const decorators = [withA11y]; |
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,20 +1,3 @@ | ||
import { makeDecorator, StoryContext, StoryGetter } from '@storybook/addons'; | ||
import deprecate from 'util-deprecate'; | ||
|
||
// This decorator is kept purely so we produce a decorator that is compatible with both | ||
// `addDecorator(withBackgrounds(...))` and `addDecorator(withBackgrounds)` | ||
export const withBackgrounds = deprecate( | ||
makeDecorator({ | ||
name: 'withBackgrounds', | ||
parameterName: 'backgrounds', | ||
wrapper: (getStory: StoryGetter, context: StoryContext) => { | ||
return getStory(context); | ||
}, | ||
}), | ||
`Note that withBackgrounds(options) has been replaced by addParameters({ backgrounds: options}) | ||
Read more about it in the migration guide: https://github.com/storybookjs/storybook/blob/master/MIGRATION.md` | ||
); | ||
|
||
if (module && module.hot && module.hot.decline) { | ||
module.hot.decline(); | ||
} |
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,24 +1,3 @@ | ||
import { window } from 'global'; | ||
import deprecate from 'util-deprecate'; | ||
|
||
import ReactCentered from './react'; | ||
import VueCentered from './vue'; | ||
|
||
// TODO: REMOVE this entire file in V6.0.0 | ||
|
||
const Centered = deprecate( | ||
() => (window.STORYBOOK_ENV === 'vue' ? VueCentered : ReactCentered), | ||
` | ||
Using "import centered from '@storybook/addon-centered'" is deprecated. | ||
Please use either: | ||
"import centered from '@storybook/addon-centered/react'" | ||
or | ||
"import centered from '@storybook/addon-centered/vue'" | ||
` | ||
)(); | ||
|
||
export default Centered; | ||
|
||
if (module && module.hot && module.hot.decline) { | ||
module.hot.decline(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.