Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix addon notes #1448

Merged
merged 1 commit into from
Jul 11, 2017
Merged

Fix addon notes #1448

merged 1 commit into from
Jul 11, 2017

Conversation

usulpro
Copy link
Member

@usulpro usulpro commented Jul 10, 2017

Issue:
currently storiesOf has such API:

storiesOf(...).add(name, (context) => { /* return <Component /> */ })

so addonNotes should pass context as well, but it doesn't

What I did

added context prop to a function returning by addonNotes

How to test

this should work:

.add('with some text', 
  addonNotes({ notes: 'Hello guys' })((context) => <div>Hello {context.story}</div>)
)

@codecov
Copy link

codecov bot commented Jul 10, 2017

Codecov Report

Merging #1448 into release/3.2 will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##           release/3.2    #1448   +/-   ##
============================================
  Coverage        15.91%   15.91%           
============================================
  Files              237      237           
  Lines             5047     5047           
  Branches           627      690   +63     
============================================
  Hits               803      803           
+ Misses            3725     3662   -63     
- Partials           519      582   +63
Impacted Files Coverage Δ
addons/notes/src/index.js 0% <0%> (ø) ⬆️
app/react-native/src/bin/storybook-start.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/PropForm.js 8.51% <0%> (ø) ⬆️
addons/events/src/components/Event.js 0% <0%> (ø) ⬆️
addons/info/src/components/markdown/code.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/api/actions/api.js 49.42% <0%> (ø) ⬆️
addons/knobs/src/KnobManager.js 35.41% <0%> (ø) ⬆️
app/react/src/client/preview/error_display.js 0% <0%> (ø) ⬆️
lib/ui/src/modules/api/configs/init_api.js 40.47% <0%> (ø) ⬆️
...react-native/src/manager/components/PreviewHelp.js 0% <0%> (ø) ⬆️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2054b9...0c9d561. Read the comment docs.

@usulpro usulpro merged commit e13d727 into release/3.2 Jul 11, 2017
@usulpro
Copy link
Member Author

usulpro commented Jul 11, 2017

Thanks

@Hypnosphi Hypnosphi deleted the Fix-addon-notes branch August 17, 2017 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants