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

CHANGE to prop-types package for notes & test-cra #1082

Merged
merged 1 commit into from
May 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addons/notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"react": "*"
},
"dependencies": {
"babel-runtime": "^6.23.0"
"babel-runtime": "^6.23.0",
"prop-types": "^15.5.10"
},
"optionalDependencies": {
"@types/react": "^15.0.24"
Expand Down
5 changes: 3 additions & 2 deletions addons/notes/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import addons from '@storybook/addons';

export class WithNotes extends React.Component {
Expand All @@ -14,6 +15,6 @@ export class WithNotes extends React.Component {
}

WithNotes.propTypes = {
children: React.PropTypes.node,
notes: React.PropTypes.string,
children: PropTypes.node,
notes: PropTypes.string,
};
5 changes: 3 additions & 2 deletions addons/notes/src/register.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import addons from '@storybook/addons';

const styles = {
Expand Down Expand Up @@ -58,8 +59,8 @@ export class Notes extends React.Component {
}

Notes.propTypes = {
channel: React.PropTypes.object,
api: React.PropTypes.object,
channel: PropTypes.object,
api: PropTypes.object,
};

// Register the addon with a unique name.
Expand Down
5 changes: 3 additions & 2 deletions examples/test-cra/src/stories/Button.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';

const buttonStyles = {
border: '1px solid #eee',
Expand All @@ -17,8 +18,8 @@ const Button = ({ children, onClick }) => (
);

Button.propTypes = {
children: React.PropTypes.string.isRequired,
onClick: React.PropTypes.func,
children: PropTypes.string.isRequired,
onClick: PropTypes.func,
};

export default Button;