Merge pull request #14246 from phunkren/patch-1

Updated refs function signature to include StorybookOptions object
This commit is contained in:
Michael Shilman 2021-03-16 20:27:58 +08:00 committed by GitHub
commit daba4282e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,8 @@
module.exports = {
// Your existing Storybook configuration
refs: (config) => {
//👇 Retrieves the current environment from the config object
const { configType } = config;
// 👇 Retrieve the current environment from the configType argument
refs: (config, { configType }) => {
if (configType === 'DEVELOPMENT') {
return {
react: {
@ -31,4 +29,4 @@ module.exports = {
};
},
};
```
```