Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
Use prop-types to access PropTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dilatorily committed Apr 19, 2017
1 parent e69986a commit 68c0572
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"object-assign": "^4.1.1",
"phantomjs-prebuilt": "^2.1.14",
"prettier": "^0.22.0",
"prop-types": "^15.5.8",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
Expand Down
3 changes: 2 additions & 1 deletion src/__tests__/radium-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import Radium from 'index.js';
import MouseUpListener from 'plugins/mouse-up-listener.js';
import React, {Component, PropTypes} from 'react';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import {getRenderOutput, getElement} from 'test-helpers';
Expand Down
3 changes: 2 additions & 1 deletion src/components/style-root.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow */

import React, {PureComponent, PropTypes} from 'react';
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';

import Enhancer from '../enhancer';
import StyleKeeper from '../style-keeper';
Expand Down
3 changes: 2 additions & 1 deletion src/components/style-sheet.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* @flow */

import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';

import StyleKeeper from '../style-keeper';

export default class StyleSheet extends PureComponent {
static contextTypes = {
_radiumStyleKeeper: React.PropTypes.instanceOf(StyleKeeper),
_radiumStyleKeeper: PropTypes.instanceOf(StyleKeeper),
};

constructor() {
Expand Down
3 changes: 2 additions & 1 deletion src/components/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import cssRuleSetToString from '../css-rule-set-to-string';

import React, {PropTypes, PureComponent} from 'react';
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';

class Style extends PureComponent {
static propTypes = {
Expand Down
3 changes: 2 additions & 1 deletion src/enhancer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* @flow */

import {Component, PropTypes} from 'react';
import {Component} from 'react';
import PropTypes from 'prop-types';

import StyleKeeper from './style-keeper.js';
import resolveStyles from './resolve-styles.js';
Expand Down
8 changes: 7 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2197,7 +2197,7 @@ faye-websocket@~0.11.0:
dependencies:
websocket-driver ">=0.5.1"

fbjs@^0.8.1, fbjs@^0.8.4:
fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.9:
version "0.8.12"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04"
dependencies:
Expand Down Expand Up @@ -4069,6 +4069,12 @@ promise@^7.1.1:
dependencies:
asap "~2.0.3"

prop-types@^15.5.8:
version "15.5.8"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394"
dependencies:
fbjs "^0.8.9"

proxy-addr@~1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3"
Expand Down

0 comments on commit 68c0572

Please sign in to comment.