Skip to content

Commit bb3e6d9

Browse files
authored
Merge pull request #1243 from TrevorEyre/1229
Fix code samples for decorators in Intro to Addons docs
2 parents f2dc38c + fca52d0 commit bb3e6d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/pages/addons/introduction/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ import Button from './button';
5656
const styles = {
5757
textAlign: 'center',
5858
};
59-
const CenterDecorator = ({ children }) => (
59+
const CenterDecorator = (storyFn) => (
6060
<div style={styles}>
61-
{ children }
61+
{ storyFn() }
6262
</div>
6363
);
6464

@@ -85,9 +85,9 @@ import Welcome from './welcome';
8585
const styles = {
8686
textAlign: 'center',
8787
};
88-
const CenterDecorator = ({ children }) => (
88+
const CenterDecorator = (storyFn) => (
8989
<div style={styles}>
90-
{ children }
90+
{ storyFn() }
9191
</div>
9292
);
9393
addDecorator(CenterDecorator);

0 commit comments

Comments
 (0)