Use the prop-types package from npm instead of React.PropTypes (#6057)

* Use the prop-types package from npm instead of React.PropTypes

* Remove using of PropTypes from React in docs and site
This commit is contained in:
Tyler 2017-05-09 13:40:33 +08:00 committed by Wei Zhu
parent 158536bbd9
commit 919cb22eb7
20 changed files with 32 additions and 20 deletions

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import Animate from 'rc-animate';
import ScrollNumber from './ScrollNumber';
import classNames from 'classnames';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
export interface BreadcrumbItemProps {
prefixCls?: string;

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import FullCalendar from 'rc-calendar/lib/FullCalendar';
import { PREFIX_CLS } from './Constants';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import RcCheckbox from 'rc-checkbox';
import shallowEqual from 'shallowequal';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import createDOMForm from 'rc-form/lib/createDOMForm';
import PureRenderMixin from 'rc-util/lib/PureRenderMixin';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import assign from 'object-assign';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
export interface ComponentProps {
locale?: any;

View File

@ -1,4 +1,4 @@
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import React from 'react';
import Icon from '../icon';
import { Circle } from 'rc-progress';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import shallowEqual from 'shallowequal';
import Radio from './radio';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import RcRadio from 'rc-radio';
import classNames from 'classnames';
import shallowEqual from 'shallowequal';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { AbstractCheckboxProps } from '../checkbox/Checkbox';
import Radio from './radio';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import RcRate from 'rc-rate';
import Icon from '../icon';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';
import classNames from 'classnames';
import Animate from 'rc-animate';

View File

@ -1,5 +1,5 @@
import React from 'react';
import { PropTypes } from 'react';
import PropTypes from 'prop-types';
import RcSteps from 'rc-steps';
export interface StepsProps {

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import RcSwitch from 'rc-switch';
import classNames from 'classnames';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import List, { TransferListProps } from './list';
import Operation from './operation';

View File

@ -108,7 +108,8 @@ Let's create a `ProductList` component that we can use in multiple places to sho
Create `components/ProductList.js` and typing:
```javascript
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Table, Popconfirm, Button } from 'antd';
const ProductList = ({ onDelete, products }) => {

View File

@ -108,7 +108,8 @@ export default Products;
新建 `components/ProductList.js` 文件:
```javascript
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Table, Popconfirm, Button } from 'antd';
const ProductList = ({ onDelete, products }) => {

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'bisheng/router';
import { Row, Col, Menu, Icon } from 'antd';
import classNames from 'classnames';

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'bisheng/router';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';