Skip to content
Permalink
Browse files

[DDW-820] Adds locale and osName as props to StoryWrapper's rendered …

…story
  • Loading branch information...
MarcusHurney committed Oct 9, 2019
1 parent 47b7fe1 commit 71cb3602e14713cdd952396f9b709f8ab23edf34
Showing with 5 additions and 2 deletions.
  1. +1 −1 storybook/stories/_support/StoryWrapper.js
  2. +4 −1 storybook/stories/nodes/about/About.stories.js
@@ -60,7 +60,7 @@ export default class StoryWrapper extends Component<Props, State> {
<IntlProvider
{...{ locale, key: locale, messages: translations[locale] }}
>
<Story />
<Story osName={this.state.osName} locale={locale} />
</IntlProvider>
</Fragment>
);
@@ -10,4 +10,7 @@ storiesOf('Nodes|About', module)
.addDecorator((story, context) => (
<StoryDecorator>{withKnobs(story, context)}</StoryDecorator>
))
.add('About Dialog', () => <AboutDialog {...aboutDialogProps} />);
.add('About Dialog', props => {
aboutDialogProps.stores.app.environment.os = props.osName;
return <AboutDialog {...aboutDialogProps} />;
});

0 comments on commit 71cb360

Please sign in to comment.
You can’t perform that action at this time.