Swap React.PropTypes to using standalone prop-types package
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
||||
const KeyValueTable = props => (
|
||||
@@ -13,13 +14,13 @@ const KeyValueTable = props => (
|
||||
);
|
||||
|
||||
KeyValueTable.propTypes = {
|
||||
max_width: React.PropTypes.string,
|
||||
rows: React.PropTypes.arrayOf(React.PropTypes.shape({
|
||||
key: React.PropTypes.string.isRequired,
|
||||
value: React.PropTypes.oneOfType([
|
||||
React.PropTypes.string,
|
||||
React.PropTypes.number,
|
||||
React.PropTypes.element,
|
||||
max_width: PropTypes.string,
|
||||
rows: PropTypes.arrayOf(PropTypes.shape({
|
||||
key: PropTypes.string.isRequired,
|
||||
value: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.number,
|
||||
PropTypes.element,
|
||||
]).isRequired,
|
||||
})).isRequired,
|
||||
};
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
|
||||
@@ -10,10 +11,10 @@ const PrintBoolean = props => (
|
||||
);
|
||||
|
||||
PrintBoolean.propTypes = {
|
||||
truthy: React.PropTypes.string,
|
||||
falsy: React.PropTypes.string,
|
||||
unknown: React.PropTypes.string,
|
||||
children: React.PropTypes.bool,
|
||||
truthy: PropTypes.string,
|
||||
falsy: PropTypes.string,
|
||||
unknown: PropTypes.string,
|
||||
children: PropTypes.bool,
|
||||
};
|
||||
|
||||
PrintBoolean.defaultProps = {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
|
||||
const SteppedProgressBar = (props) => {
|
||||
@@ -20,8 +21,8 @@ const SteppedProgressBar = (props) => {
|
||||
};
|
||||
|
||||
SteppedProgressBar.propTypes = {
|
||||
steps_count: React.PropTypes.number.isRequired,
|
||||
step: React.PropTypes.number.isRequired,
|
||||
steps_count: PropTypes.number.isRequired,
|
||||
step: PropTypes.number.isRequired,
|
||||
};
|
||||
|
||||
module.exports = SteppedProgressBar;
|
||||
|
Reference in New Issue
Block a user