addDecorator should be chainable
jairtrejo opened this issue · 2 comments
jairtrejo commented
The addDecorator
function should return this
so it is chainable. That would enable doing things like:
storiesOf('Favorite').addDecorator((story) => (
<View style={{
flexDirection: 'column',
alignItems: 'stretch',
justifyContent: 'center',
flex: 1}}
>
{ story() }
</View>
))
.add('default view', () => (
<FavoriteComponent favorite={ simpleFavorite }
onPress={ action('Favorite pressed') }/>
))
.add('missing URL', () => (
<FavoriteComponent favorite={ missingURLFavorite }
onPress={ action('Favorite pressed') }/>
));
It is chainable in the React DOM version :)
Thanks in advance!
thani-sh commented
Hi @jairtrejo
Just released v1.11.3
with a fix. It should work now.
jairtrejo commented
Thank you! You guys are super fast