Skip to content

Commit

Permalink
Importing PropTypes from prop-types rather than react (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrockWills authored and javivelasco committed Apr 17, 2017
1 parent e572dd7 commit ae09770
Show file tree
Hide file tree
Showing 83 changed files with 212 additions and 123 deletions.
3 changes: 2 additions & 1 deletion components/app_bar/AppBar.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import { themr } from 'react-css-themr';
import { APP_BAR } from '../identifiers';
Expand Down
15 changes: 8 additions & 7 deletions components/autocomplete/Autocomplete.js
@@ -1,5 +1,6 @@
/* eslint-disable */
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
Expand All @@ -21,14 +22,14 @@ const factory = (Chip, Input) => {
className: PropTypes.string,
direction: PropTypes.oneOf(['auto', 'up', 'down']),
disabled: PropTypes.bool,
error: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.node,
error: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node,
]),
keepFocusOnChange: PropTypes.bool,
label: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.node,
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.node,
]),
multiple: PropTypes.bool,
onBlur: PropTypes.func,
Expand Down
3 changes: 2 additions & 1 deletion components/avatar/Avatar.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { AVATAR } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/button/BrowseButton.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { BUTTON } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/button/Button.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { BUTTON } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/button/IconButton.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { BUTTON } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/card/Card.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import { CARD } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/card/CardActions.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import { CARD } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/card/CardMedia.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import { CARD } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/card/CardText.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import { CARD } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/card/CardTitle.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { CARD } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/checkbox/Check.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styleShape from 'react-style-proptype';

Expand Down
3 changes: 2 additions & 1 deletion components/checkbox/Checkbox.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styleShape from 'react-style-proptype';
import { themr } from 'react-css-themr';
Expand Down
3 changes: 2 additions & 1 deletion components/chip/Chip.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { CHIP } from '../identifiers';
Expand Down
15 changes: 8 additions & 7 deletions components/date_picker/Calendar.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import CssTransitionGroup from 'react-addons-css-transition-group';
import { range, getAnimationModule } from '../utils/utils';
import time from '../utils/time';
Expand All @@ -9,19 +10,19 @@ const DIRECTION_STEPS = { left: -1, right: 1 };
const factory = (IconButton) => {
class Calendar extends Component {
static propTypes = {
disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
display: PropTypes.oneOf(['months', 'years']),
enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
handleSelect: PropTypes.func,
locale: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.object,
locale: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
maxDate: PropTypes.instanceOf(Date),
minDate: PropTypes.instanceOf(Date),
onChange: PropTypes.func,
selectedDate: PropTypes.instanceOf(Date),
sundayFirstDayOfWeek: React.PropTypes.bool,
sundayFirstDayOfWeek: PropTypes.bool,
theme: PropTypes.shape({
active: PropTypes.string,
calendar: PropTypes.string,
Expand Down
3 changes: 2 additions & 1 deletion components/date_picker/CalendarDay.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import time from '../utils/time';

Expand Down
15 changes: 8 additions & 7 deletions components/date_picker/CalendarMonth.js
@@ -1,21 +1,22 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { range } from '../utils/utils';
import time from '../utils/time';
import CalendarDay from './CalendarDay';

class Month extends Component {
static propTypes = {
disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
locale: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.object,
disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
locale: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
maxDate: PropTypes.instanceOf(Date),
minDate: PropTypes.instanceOf(Date),
onDayClick: PropTypes.func,
selectedDate: PropTypes.instanceOf(Date),
sundayFirstDayOfWeek: React.PropTypes.bool,
sundayFirstDayOfWeek: PropTypes.bool,
theme: PropTypes.shape({
days: PropTypes.string,
month: PropTypes.string,
Expand Down
15 changes: 8 additions & 7 deletions components/date_picker/DatePicker.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { DATE_PICKER } from '../identifiers';
Expand All @@ -18,8 +19,8 @@ const factory = (Input, DatePickerDialog) => {
autoOk: PropTypes.bool,
cancelLabel: PropTypes.string,
className: PropTypes.string,
disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
error: PropTypes.string,
icon: PropTypes.oneOfType([
PropTypes.string,
Expand All @@ -28,9 +29,9 @@ const factory = (Input, DatePickerDialog) => {
inputClassName: PropTypes.string,
inputFormat: PropTypes.func,
label: PropTypes.string,
locale: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.object,
locale: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
maxDate: PropTypes.instanceOf(Date),
minDate: PropTypes.instanceOf(Date),
Expand All @@ -43,7 +44,7 @@ const factory = (Input, DatePickerDialog) => {
onKeyPress: PropTypes.func,
onOverlayClick: PropTypes.func,
readonly: PropTypes.bool,
sundayFirstDayOfWeek: React.PropTypes.bool,
sundayFirstDayOfWeek: PropTypes.bool,
theme: PropTypes.shape({
container: PropTypes.string,
input: PropTypes.string,
Expand Down
15 changes: 8 additions & 7 deletions components/date_picker/DatePickerDialog.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import time from '../utils/time';

Expand All @@ -9,11 +10,11 @@ const factory = (Dialog, Calendar) => {
autoOk: PropTypes.bool,
cancelLabel: PropTypes.string,
className: PropTypes.string,
disabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: React.PropTypes.arrayOf(PropTypes.instanceOf(Date)),
locale: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.object,
disabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
enabledDates: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
locale: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
]),
maxDate: PropTypes.instanceOf(Date),
minDate: PropTypes.instanceOf(Date),
Expand All @@ -23,7 +24,7 @@ const factory = (Dialog, Calendar) => {
onEscKeyDown: PropTypes.func,
onOverlayClick: PropTypes.func,
onSelect: PropTypes.func,
sundayFirstDayOfWeek: React.PropTypes.bool,
sundayFirstDayOfWeek: PropTypes.bool,
theme: PropTypes.shape({
button: PropTypes.string,
calendarWrapper: PropTypes.string,
Expand Down
3 changes: 2 additions & 1 deletion components/dialog/Dialog.js
@@ -1,5 +1,6 @@
/* eslint-disable jsx-a11y/aria-role */
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import { DIALOG } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/drawer/Drawer.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
import Portal from '../hoc/Portal';
Expand Down
3 changes: 2 additions & 1 deletion components/dropdown/Dropdown.js
@@ -1,5 +1,6 @@
/* eslint-disable */
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
Expand Down
3 changes: 2 additions & 1 deletion components/font_icon/FontIcon.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';

const FontIcon = ({ alt, children, className, theme, value, ...other}) => ( // eslint-disable-line
Expand Down
3 changes: 2 additions & 1 deletion components/hoc/ActivableRenderer.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';

const ActivableRendererFactory = (options = { delay: 500 }) =>
ActivableComponent => class ActivableRenderer extends Component {
Expand Down
3 changes: 2 additions & 1 deletion components/hoc/Portal.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';

class Portal extends Component {
Expand Down
3 changes: 2 additions & 1 deletion components/input/Input.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { INPUT } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/layout/Layout.js
@@ -1,4 +1,5 @@
import React, { cloneElement, Component, PropTypes } from 'react';
import React, { cloneElement, Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { getViewport } from '../utils/utils';
Expand Down
3 changes: 2 additions & 1 deletion components/layout/NavDrawer.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import InjectDrawer from '../drawer/Drawer';
Expand Down
3 changes: 2 additions & 1 deletion components/layout/Panel.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import { themr } from 'react-css-themr';
import { LAYOUT } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/layout/Sidebar.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import InjectDrawer from '../drawer/Drawer';
Expand Down
3 changes: 2 additions & 1 deletion components/link/Link.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { LINK } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/list/List.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/list/ListCheckbox.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';
Expand Down
3 changes: 2 additions & 1 deletion components/list/ListDivider.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';

Expand Down
3 changes: 2 additions & 1 deletion components/list/ListItem.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';
import InjectListItemContent from './ListItemContent';
Expand Down
3 changes: 2 additions & 1 deletion components/list/ListItemAction.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';

Expand Down
3 changes: 2 additions & 1 deletion components/list/ListItemActions.js
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';
import InjectListItemAction from './ListItemAction';
Expand Down
3 changes: 2 additions & 1 deletion components/list/ListItemContent.js
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers';
Expand Down

0 comments on commit ae09770

Please sign in to comment.