Skip to content

Commit 58218c1

Browse files
committed
feat: support story options
1 parent f41bd3f commit 58218c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export default makeDecorator({
77
parameterName: 'mockData',
88
// This means don't run this decorator if the notes decorator is not set
99
skipIfNoParametersOrOptions: true,
10-
wrapper: (getStory, context, { parameters }) => {
10+
wrapper: (getStory, context, { options, parameters }) => {
1111
const channel = addons.getChannel();
12-
faker.makeInitialRequestMap(parameters);
12+
faker.makeInitialRequestMap(options.concat(parameters));
1313

1414
// Our simple API above simply sets the notes parameter to a string,
1515
// which we send to the channel

0 commit comments

Comments
 (0)