diff --git a/addons/notes/package.json b/addons/notes/package.json index 1a6f2d8c0be..b89ba06f165 100644 --- a/addons/notes/package.json +++ b/addons/notes/package.json @@ -21,8 +21,16 @@ "dependencies": { "@storybook/addons": "^3.1.2", "babel-runtime": "^6.23.0", - "prop-types": "^15.5.10", - "react": "^15.5.4", "util-deprecate": "^1.0.2" + }, + "devDependencies": { + "prop-types": "^15.5.10", + "react": "^15.5.4" + }, + "peerDependencies": { + "react": "*" + }, + "optionalDependencies": { + "@types/react": "^15.0.24" } } diff --git a/addons/notes/src/index.js b/addons/notes/src/index.js index 35bc9c6b858..7aff6cb5cbf 100644 --- a/addons/notes/src/index.js +++ b/addons/notes/src/index.js @@ -4,9 +4,9 @@ import { WithNotes as ReactWithNotes } from './react'; export const withNotes = ({ notes }) => { const channel = addons.getChannel(); - // send the notes to the channel. return getStory => () => { + // send the notes to the channel before the story is rendered channel.emit('storybook/notes/add_notes', notes); return getStory(); };