chore: do not use React.PropTypes directly
This commit is contained in:
parent
be9eb8ce91
commit
ecc086f15d
@ -107,6 +107,7 @@
|
||||
"notifyjs": "^3.0.0",
|
||||
"prettier": "^1.9.2",
|
||||
"promise-toolbox": "^0.9.5",
|
||||
"prop-types": "^15.6.0",
|
||||
"random-password": "^0.1.2",
|
||||
"react": "^15.4.1",
|
||||
"react-addons-shallow-compare": "^15.6.2",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { Component } from 'react'
|
||||
import { isPromise } from 'promise-toolbox'
|
||||
|
||||
const toString = value =>
|
||||
|
@ -1,7 +1,8 @@
|
||||
import isFunction from 'lodash/isFunction'
|
||||
import isString from 'lodash/isString'
|
||||
import moment from 'moment'
|
||||
import React, { Component, PropTypes } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { Component } from 'react'
|
||||
import { connect } from 'react-redux'
|
||||
import { FormattedMessage, IntlProvider as IntlProvider_ } from 'react-intl'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import assign from 'lodash/assign'
|
||||
import { PropTypes } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
// Decorators to help declaring properties and context types on React
|
||||
// components without using the tedious static properties syntax.
|
||||
|
@ -1,6 +1,7 @@
|
||||
import _ from 'intl'
|
||||
import classNames from 'classnames'
|
||||
import React, { PropTypes, cloneElement } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { cloneElement } from 'react'
|
||||
import sum from 'lodash/sum'
|
||||
|
||||
import Tooltip from '../tooltip'
|
||||
|
@ -4,6 +4,7 @@ import DocumentTitle from 'react-document-title'
|
||||
import Icon from 'icon'
|
||||
import isArray from 'lodash/isArray'
|
||||
import map from 'lodash/map'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import Shortcuts from 'shortcuts'
|
||||
import themes from 'themes'
|
||||
@ -97,10 +98,10 @@ const BODY_STYLE = {
|
||||
})
|
||||
export default class XoApp extends Component {
|
||||
static contextTypes = {
|
||||
router: React.PropTypes.object,
|
||||
router: PropTypes.object,
|
||||
}
|
||||
static childContextTypes = {
|
||||
shortcuts: React.PropTypes.object.isRequired,
|
||||
shortcuts: PropTypes.object.isRequired,
|
||||
}
|
||||
getChildContext = () => ({ shortcuts: shortcutManager })
|
||||
|
||||
|
@ -7,6 +7,7 @@ import defined, { get } from 'xo-defined'
|
||||
import Icon from 'icon'
|
||||
import isIp from 'is-ip'
|
||||
import Page from '../page'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import store from 'store'
|
||||
import Tags from 'tags'
|
||||
@ -210,7 +211,7 @@ class Vif extends BaseComponent {
|
||||
@injectIntl
|
||||
export default class NewVm extends BaseComponent {
|
||||
static contextTypes = {
|
||||
router: React.PropTypes.object,
|
||||
router: PropTypes.object,
|
||||
}
|
||||
|
||||
constructor () {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { messages } from 'intl'
|
||||
import DocumentTitle from 'react-document-title'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import { injectIntl } from 'react-intl'
|
||||
|
||||
|
@ -3,6 +3,7 @@ import Component from 'base-component'
|
||||
import Icon from 'icon'
|
||||
import Link from 'link'
|
||||
import Page from '../page'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { cloneElement } from 'react'
|
||||
import SrActionBar from './action-bar'
|
||||
import { Container, Row, Col } from 'grid'
|
||||
@ -90,7 +91,7 @@ import TabXosan from './tab-xosan'
|
||||
})
|
||||
export default class Sr extends Component {
|
||||
static contextTypes = {
|
||||
router: React.PropTypes.object,
|
||||
router: PropTypes.object,
|
||||
}
|
||||
|
||||
componentWillReceiveProps (props) {
|
||||
|
@ -4,6 +4,7 @@ import Icon from 'icon'
|
||||
import Link from 'link'
|
||||
import { NavLink, NavTabs } from 'nav'
|
||||
import Page from '../page'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { cloneElement } from 'react'
|
||||
import VmActionBar from './action-bar'
|
||||
import { Select, Text } from 'editable'
|
||||
|
Loading…
Reference in New Issue
Block a user