From ae09770cd4aab861e95a070b975d7fdef1ace082 Mon Sep 17 00:00:00 2001 From: Brock Wills Date: Tue, 18 Apr 2017 02:14:17 +1200 Subject: [PATCH] Importing PropTypes from prop-types rather than react (#1413) --- components/app_bar/AppBar.js | 3 ++- components/autocomplete/Autocomplete.js | 15 ++++++++------- components/avatar/Avatar.js | 3 ++- components/button/BrowseButton.js | 3 ++- components/button/Button.js | 3 ++- components/button/IconButton.js | 3 ++- components/card/Card.js | 3 ++- components/card/CardActions.js | 3 ++- components/card/CardMedia.js | 3 ++- components/card/CardText.js | 3 ++- components/card/CardTitle.js | 3 ++- components/checkbox/Check.js | 3 ++- components/checkbox/Checkbox.js | 3 ++- components/chip/Chip.js | 3 ++- components/date_picker/Calendar.js | 15 ++++++++------- components/date_picker/CalendarDay.js | 3 ++- components/date_picker/CalendarMonth.js | 15 ++++++++------- components/date_picker/DatePicker.js | 15 ++++++++------- components/date_picker/DatePickerDialog.js | 15 ++++++++------- components/dialog/Dialog.js | 3 ++- components/drawer/Drawer.js | 3 ++- components/dropdown/Dropdown.js | 3 ++- components/font_icon/FontIcon.js | 3 ++- components/hoc/ActivableRenderer.js | 3 ++- components/hoc/Portal.js | 3 ++- components/input/Input.js | 3 ++- components/layout/Layout.js | 3 ++- components/layout/NavDrawer.js | 3 ++- components/layout/Panel.js | 3 ++- components/layout/Sidebar.js | 3 ++- components/link/Link.js | 3 ++- components/list/List.js | 3 ++- components/list/ListCheckbox.js | 3 ++- components/list/ListDivider.js | 3 ++- components/list/ListItem.js | 3 ++- components/list/ListItemAction.js | 3 ++- components/list/ListItemActions.js | 3 ++- components/list/ListItemContent.js | 3 ++- components/list/ListItemLayout.js | 3 ++- components/list/ListItemText.js | 3 ++- components/list/ListSubHeader.js | 3 ++- components/menu/IconMenu.js | 3 ++- components/menu/Menu.js | 3 ++- components/menu/MenuDivider.js | 3 ++- components/menu/MenuItem.js | 3 ++- components/navigation/Navigation.js | 3 ++- components/overlay/Overlay.js | 3 ++- components/progress_bar/ProgressBar.js | 3 ++- components/radio/Radio.js | 3 ++- components/radio/RadioButton.js | 3 ++- components/radio/RadioGroup.js | 3 ++- components/ripple/Ripple.js | 3 ++- components/slider/Slider.js | 3 ++- components/snackbar/Snackbar.js | 3 ++- components/switch/Switch.js | 3 ++- components/switch/Thumb.js | 3 ++- components/table/Table.js | 3 ++- components/table/TableCell.js | 3 ++- components/table/TableHead.js | 3 ++- components/table/TableRow.js | 3 ++- components/tabs/Tab.js | 3 ++- components/tabs/TabContent.js | 3 ++- components/tabs/Tabs.js | 3 ++- components/time_picker/Clock.js | 3 ++- components/time_picker/ClockFace.js | 3 ++- components/time_picker/ClockHand.js | 3 ++- components/time_picker/ClockHours.js | 3 ++- components/time_picker/ClockMinutes.js | 3 ++- components/time_picker/TimePicker.js | 3 ++- components/time_picker/TimePickerDialog.js | 3 ++- components/tooltip/Tooltip.js | 3 ++- docs/app/components/appbar/index.js | 3 ++- docs/app/components/editor/index.js | 15 ++++++++------- .../layout/main/components/navigation.js | 3 ++- .../layout/main/components/playground.js | 3 ++- docs/app/components/layout/main/index.js | 7 ++++--- docs/app/components/logo/index.js | 3 ++- docs/app/components/markdown/index.js | 5 +++-- docs/app/components/navigation/index.js | 5 +++-- docs/app/components/preview/index.js | 7 ++++--- package.json | 2 ++ spec/components/dialog.js | 3 ++- yarn.lock | 6 ++++++ 83 files changed, 212 insertions(+), 123 deletions(-) diff --git a/components/app_bar/AppBar.js b/components/app_bar/AppBar.js index 85e90c6e7..d4421b87d 100644 --- a/components/app_bar/AppBar.js +++ b/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'; diff --git a/components/autocomplete/Autocomplete.js b/components/autocomplete/Autocomplete.js index 458f40c14..099a03378 100644 --- a/components/autocomplete/Autocomplete.js +++ b/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'; @@ -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, diff --git a/components/avatar/Avatar.js b/components/avatar/Avatar.js index e73ebe99d..9d9dd9448 100644 --- a/components/avatar/Avatar.js +++ b/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'; diff --git a/components/button/BrowseButton.js b/components/button/BrowseButton.js index 199b27c6e..662de5c8b 100644 --- a/components/button/BrowseButton.js +++ b/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'; diff --git a/components/button/Button.js b/components/button/Button.js index 5584e3ff6..90634ea87 100644 --- a/components/button/Button.js +++ b/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'; diff --git a/components/button/IconButton.js b/components/button/IconButton.js index 149927564..dde3d4787 100644 --- a/components/button/IconButton.js +++ b/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'; diff --git a/components/card/Card.js b/components/card/Card.js index 9c15137c4..6f22b7138 100644 --- a/components/card/Card.js +++ b/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'; diff --git a/components/card/CardActions.js b/components/card/CardActions.js index e11ae865d..385550830 100644 --- a/components/card/CardActions.js +++ b/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'; diff --git a/components/card/CardMedia.js b/components/card/CardMedia.js index cf32853ed..b12a4cbfe 100644 --- a/components/card/CardMedia.js +++ b/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'; diff --git a/components/card/CardText.js b/components/card/CardText.js index a9caf0596..f0f8a847d 100644 --- a/components/card/CardText.js +++ b/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'; diff --git a/components/card/CardTitle.js b/components/card/CardTitle.js index 92dce98df..1aa74a58a 100644 --- a/components/card/CardTitle.js +++ b/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'; diff --git a/components/checkbox/Check.js b/components/checkbox/Check.js index 71528634e..2274594c9 100644 --- a/components/checkbox/Check.js +++ b/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'; diff --git a/components/checkbox/Checkbox.js b/components/checkbox/Checkbox.js index 5891eee34..94f93e02a 100644 --- a/components/checkbox/Checkbox.js +++ b/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'; diff --git a/components/chip/Chip.js b/components/chip/Chip.js index a791be37e..bb60a1053 100644 --- a/components/chip/Chip.js +++ b/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'; diff --git a/components/date_picker/Calendar.js b/components/date_picker/Calendar.js index 4a0cfc5a1..360f9cb05 100644 --- a/components/date_picker/Calendar.js +++ b/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'; @@ -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, diff --git a/components/date_picker/CalendarDay.js b/components/date_picker/CalendarDay.js index 027c010f1..e4257a125 100644 --- a/components/date_picker/CalendarDay.js +++ b/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'; diff --git a/components/date_picker/CalendarMonth.js b/components/date_picker/CalendarMonth.js index 08fb20aac..fdd9625a5 100644 --- a/components/date_picker/CalendarMonth.js +++ b/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, diff --git a/components/date_picker/DatePicker.js b/components/date_picker/DatePicker.js index 680290167..58211e8da 100644 --- a/components/date_picker/DatePicker.js +++ b/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'; @@ -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, @@ -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), @@ -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, diff --git a/components/date_picker/DatePickerDialog.js b/components/date_picker/DatePickerDialog.js index ea4c0baa2..869572ed5 100644 --- a/components/date_picker/DatePickerDialog.js +++ b/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'; @@ -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), @@ -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, diff --git a/components/dialog/Dialog.js b/components/dialog/Dialog.js index 74330861a..5f9e2d406 100644 --- a/components/dialog/Dialog.js +++ b/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'; diff --git a/components/drawer/Drawer.js b/components/drawer/Drawer.js index 75dc8a7db..caba56db9 100644 --- a/components/drawer/Drawer.js +++ b/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'; diff --git a/components/dropdown/Dropdown.js b/components/dropdown/Dropdown.js index a9d527b01..d31e7e4d7 100644 --- a/components/dropdown/Dropdown.js +++ b/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'; diff --git a/components/font_icon/FontIcon.js b/components/font_icon/FontIcon.js index a56bd612c..26fe4b5fd 100644 --- a/components/font_icon/FontIcon.js +++ b/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 diff --git a/components/hoc/ActivableRenderer.js b/components/hoc/ActivableRenderer.js index bc2908b75..edb6455c8 100644 --- a/components/hoc/ActivableRenderer.js +++ b/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 { diff --git a/components/hoc/Portal.js b/components/hoc/Portal.js index 2e09b10d2..99769747e 100644 --- a/components/hoc/Portal.js +++ b/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 { diff --git a/components/input/Input.js b/components/input/Input.js index 230472a9c..545fe8d39 100644 --- a/components/input/Input.js +++ b/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'; diff --git a/components/layout/Layout.js b/components/layout/Layout.js index 6277a1a96..8c540436c 100644 --- a/components/layout/Layout.js +++ b/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'; diff --git a/components/layout/NavDrawer.js b/components/layout/NavDrawer.js index e4a36b218..967afc6b8 100644 --- a/components/layout/NavDrawer.js +++ b/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'; diff --git a/components/layout/Panel.js b/components/layout/Panel.js index a7cbfd474..244104054 100644 --- a/components/layout/Panel.js +++ b/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'; diff --git a/components/layout/Sidebar.js b/components/layout/Sidebar.js index 006d8231c..562dde224 100644 --- a/components/layout/Sidebar.js +++ b/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'; diff --git a/components/link/Link.js b/components/link/Link.js index 382f2a8d3..7097759b9 100644 --- a/components/link/Link.js +++ b/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'; diff --git a/components/list/List.js b/components/list/List.js index f90c7324c..a9a14f69c 100644 --- a/components/list/List.js +++ b/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'; diff --git a/components/list/ListCheckbox.js b/components/list/ListCheckbox.js index b2a7203da..9498b6606 100644 --- a/components/list/ListCheckbox.js +++ b/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'; diff --git a/components/list/ListDivider.js b/components/list/ListDivider.js index 851575ad0..80eaa97f8 100644 --- a/components/list/ListDivider.js +++ b/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'; diff --git a/components/list/ListItem.js b/components/list/ListItem.js index 79d0056b0..f2e836b03 100644 --- a/components/list/ListItem.js +++ b/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'; diff --git a/components/list/ListItemAction.js b/components/list/ListItemAction.js index 838d2adc5..c74bc44c5 100644 --- a/components/list/ListItemAction.js +++ b/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'; diff --git a/components/list/ListItemActions.js b/components/list/ListItemActions.js index 71f9e6396..010534166 100644 --- a/components/list/ListItemActions.js +++ b/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'; diff --git a/components/list/ListItemContent.js b/components/list/ListItemContent.js index 8a6dff295..561be3266 100644 --- a/components/list/ListItemContent.js +++ b/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'; diff --git a/components/list/ListItemLayout.js b/components/list/ListItemLayout.js index d7be0565d..0ee7f1996 100644 --- a/components/list/ListItemLayout.js +++ b/components/list/ListItemLayout.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'; diff --git a/components/list/ListItemText.js b/components/list/ListItemText.js index 21160508f..20bfb6110 100644 --- a/components/list/ListItemText.js +++ b/components/list/ListItemText.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'; diff --git a/components/list/ListSubHeader.js b/components/list/ListSubHeader.js index db4a1fd5a..31f988f8f 100644 --- a/components/list/ListSubHeader.js +++ b/components/list/ListSubHeader.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'; diff --git a/components/menu/IconMenu.js b/components/menu/IconMenu.js index 9962b5c13..3fd7341ce 100644 --- a/components/menu/IconMenu.js +++ b/components/menu/IconMenu.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 { MENU } from '../identifiers'; diff --git a/components/menu/Menu.js b/components/menu/Menu.js index efd461567..77333ac3b 100644 --- a/components/menu/Menu.js +++ b/components/menu/Menu.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'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; diff --git a/components/menu/MenuDivider.js b/components/menu/MenuDivider.js index 89543bca2..242b1834a 100644 --- a/components/menu/MenuDivider.js +++ b/components/menu/MenuDivider.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 { MENU } from '../identifiers'; diff --git a/components/menu/MenuItem.js b/components/menu/MenuItem.js index d573704b6..5b5cfffa0 100644 --- a/components/menu/MenuItem.js +++ b/components/menu/MenuItem.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 { MENU } from '../identifiers'; diff --git a/components/navigation/Navigation.js b/components/navigation/Navigation.js index 29a014fbd..8a364c98f 100644 --- a/components/navigation/Navigation.js +++ b/components/navigation/Navigation.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 { NAVIGATION } from '../identifiers'; diff --git a/components/overlay/Overlay.js b/components/overlay/Overlay.js index d33a2c7fc..59992e1ed 100644 --- a/components/overlay/Overlay.js +++ b/components/overlay/Overlay.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 { OVERLAY } from '../identifiers'; diff --git a/components/progress_bar/ProgressBar.js b/components/progress_bar/ProgressBar.js index 8cdccedc3..b8957fc6f 100644 --- a/components/progress_bar/ProgressBar.js +++ b/components/progress_bar/ProgressBar.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 { PROGRESS_BAR } from '../identifiers'; diff --git a/components/radio/Radio.js b/components/radio/Radio.js index 7b9d9b61a..1d18cfd38 100644 --- a/components/radio/Radio.js +++ b/components/radio/Radio.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; const factory = (ripple) => { const Radio = ({ checked, onMouseDown, theme, ...other }) => ( diff --git a/components/radio/RadioButton.js b/components/radio/RadioButton.js index 69fc2a092..6d36c6f6d 100644 --- a/components/radio/RadioButton.js +++ b/components/radio/RadioButton.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 { RADIO } from '../identifiers'; diff --git a/components/radio/RadioGroup.js b/components/radio/RadioGroup.js index a04888945..13d8b3df6 100644 --- a/components/radio/RadioGroup.js +++ b/components/radio/RadioGroup.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 { RADIO } from '../identifiers'; import InjectRadioButton from './RadioButton'; diff --git a/components/ripple/Ripple.js b/components/ripple/Ripple.js index 150a3f746..2709b6501 100644 --- a/components/ripple/Ripple.js +++ b/components/ripple/Ripple.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'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; diff --git a/components/slider/Slider.js b/components/slider/Slider.js index 229670ba1..01edef5c2 100644 --- a/components/slider/Slider.js +++ b/components/slider/Slider.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'; import classnames from 'classnames'; import styleShape from 'react-style-proptype'; diff --git a/components/snackbar/Snackbar.js b/components/snackbar/Snackbar.js index feb0859ae..bf3556442 100644 --- a/components/snackbar/Snackbar.js +++ b/components/snackbar/Snackbar.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 { SNACKBAR } from '../identifiers'; diff --git a/components/switch/Switch.js b/components/switch/Switch.js index 16cd228fc..3dee9b256 100644 --- a/components/switch/Switch.js +++ b/components/switch/Switch.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 { SWITCH } from '../identifiers'; diff --git a/components/switch/Thumb.js b/components/switch/Thumb.js index 92e9a82c5..0f195e6b6 100644 --- a/components/switch/Thumb.js +++ b/components/switch/Thumb.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; const factory = (ripple) => { const Thumb = ({ onMouseDown, theme, ...other }) => ( diff --git a/components/table/Table.js b/components/table/Table.js index cbaf1d79c..f7eff3c9f 100644 --- a/components/table/Table.js +++ b/components/table/Table.js @@ -1,4 +1,5 @@ -import React, { PropTypes, Component, cloneElement } from 'react'; +import React, { Component, cloneElement } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; import { themr } from 'react-css-themr'; import filterReactChildren from '../utils/filter-react-children'; diff --git a/components/table/TableCell.js b/components/table/TableCell.js index 3324c118d..3785b7749 100644 --- a/components/table/TableCell.js +++ b/components/table/TableCell.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 { TABLE } from '../identifiers'; diff --git a/components/table/TableHead.js b/components/table/TableHead.js index 74ec38b1b..06fccdf13 100644 --- a/components/table/TableHead.js +++ b/components/table/TableHead.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes, cloneElement } from 'react'; +import React, { Component, cloneElement } from 'react'; +import PropTypes from 'prop-types'; import { themr } from 'react-css-themr'; import { TABLE } from '../identifiers'; import InjectCheckbox from '../checkbox/Checkbox'; diff --git a/components/table/TableRow.js b/components/table/TableRow.js index 4acd26f9e..b490d42dc 100644 --- a/components/table/TableRow.js +++ b/components/table/TableRow.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 { TABLE } from '../identifiers'; diff --git a/components/tabs/Tab.js b/components/tabs/Tab.js index 40fcee5bf..eb35c2228 100644 --- a/components/tabs/Tab.js +++ b/components/tabs/Tab.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 { FontIcon } from '../font_icon'; diff --git a/components/tabs/TabContent.js b/components/tabs/TabContent.js index a329a364f..b9c98beac 100644 --- a/components/tabs/TabContent.js +++ b/components/tabs/TabContent.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 { TABS } from '../identifiers'; diff --git a/components/tabs/Tabs.js b/components/tabs/Tabs.js index 2d617df59..81c734589 100644 --- a/components/tabs/Tabs.js +++ b/components/tabs/Tabs.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 { TABS } from '../identifiers'; diff --git a/components/time_picker/Clock.js b/components/time_picker/Clock.js index 43a6fe3b8..b8a4fef63 100644 --- a/components/time_picker/Clock.js +++ b/components/time_picker/Clock.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 { getAnimationModule } from '../utils/utils'; import time from '../utils/time'; diff --git a/components/time_picker/ClockFace.js b/components/time_picker/ClockFace.js index 5fcfcf776..279be6de9 100644 --- a/components/time_picker/ClockFace.js +++ b/components/time_picker/ClockFace.js @@ -1,5 +1,6 @@ /* eslint-disable no-mixed-operators */ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import classnames from 'classnames'; class Face extends Component { diff --git a/components/time_picker/ClockHand.js b/components/time_picker/ClockHand.js index 5eb8aee67..d6cb88c1b 100644 --- a/components/time_picker/ClockHand.js +++ b/components/time_picker/ClockHand.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { angle360FromPositions } from '../utils/utils'; import events from '../utils/events'; import prefixer from '../utils/prefixer'; diff --git a/components/time_picker/ClockHours.js b/components/time_picker/ClockHours.js index fa24e9261..71a067e41 100644 --- a/components/time_picker/ClockHours.js +++ b/components/time_picker/ClockHours.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { range } from '../utils/utils'; import Hand from './ClockHand'; import Face from './ClockFace'; diff --git a/components/time_picker/ClockMinutes.js b/components/time_picker/ClockMinutes.js index e06e44044..34c15ac48 100644 --- a/components/time_picker/ClockMinutes.js +++ b/components/time_picker/ClockMinutes.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import { range } from '../utils/utils'; import Hand from './ClockHand'; import Face from './ClockFace'; diff --git a/components/time_picker/TimePicker.js b/components/time_picker/TimePicker.js index 74804f42f..723ca2068 100644 --- a/components/time_picker/TimePicker.js +++ b/components/time_picker/TimePicker.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 { TIME_PICKER } from '../identifiers'; diff --git a/components/time_picker/TimePickerDialog.js b/components/time_picker/TimePickerDialog.js index 5d16b5971..28d219557 100644 --- a/components/time_picker/TimePickerDialog.js +++ b/components/time_picker/TimePickerDialog.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; import cn from 'classnames'; import time from '../utils/time'; import Clock from './Clock'; diff --git a/components/tooltip/Tooltip.js b/components/tooltip/Tooltip.js index 9a6c2cc12..f2a07617a 100644 --- a/components/tooltip/Tooltip.js +++ b/components/tooltip/Tooltip.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 Portal from '../hoc/Portal'; diff --git a/docs/app/components/appbar/index.js b/docs/app/components/appbar/index.js index 2bdd81389..4ec696868 100644 --- a/docs/app/components/appbar/index.js +++ b/docs/app/components/appbar/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { AppBar } from 'react-toolbox'; import { Link } from 'react-router'; import Logo from '../logo'; @@ -20,7 +21,7 @@ const MainAppBar = (props) => { }; MainAppBar.propTypes = { - className: React.PropTypes.string + className: PropTypes.string }; MainAppBar.defaultProps = { diff --git a/docs/app/components/editor/index.js b/docs/app/components/editor/index.js index 2b6536dd2..51238eb37 100644 --- a/docs/app/components/editor/index.js +++ b/docs/app/components/editor/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import CodeMirror from 'codemirror'; import style from './style.css'; import 'codemirror/lib/codemirror.css'; @@ -7,13 +8,13 @@ import './one-dark.css'; class Editor extends React.Component { static propTypes = { - className: React.PropTypes.string, - codeText: React.PropTypes.string, - lineNumbers: React.PropTypes.bool, - onChange: React.PropTypes.func, - readOnly: React.PropTypes.bool, - tabSize: React.PropTypes.number, - theme: React.PropTypes.string + className: PropTypes.string, + codeText: PropTypes.string, + lineNumbers: PropTypes.bool, + onChange: PropTypes.func, + readOnly: PropTypes.bool, + tabSize: PropTypes.number, + theme: PropTypes.string }; static defaultProps = { diff --git a/docs/app/components/layout/main/components/navigation.js b/docs/app/components/layout/main/components/navigation.js index 1a8079795..305a252c0 100644 --- a/docs/app/components/layout/main/components/navigation.js +++ b/docs/app/components/layout/main/components/navigation.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { List, ListItem } from 'react-toolbox'; import classnames from 'classnames'; import components from '../modules/components'; diff --git a/docs/app/components/layout/main/components/playground.js b/docs/app/components/layout/main/components/playground.js index 29e93b310..9a6e6f235 100644 --- a/docs/app/components/layout/main/components/playground.js +++ b/docs/app/components/layout/main/components/playground.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import Editor from '../../../editor'; import Preview from '../../../preview'; import codeText from '../modules/examples/example.txt'; @@ -6,7 +7,7 @@ import style from './playground.css'; class Playground extends React.Component { static propTypes = { - className: React.PropTypes.string + className: PropTypes.string }; state = { diff --git a/docs/app/components/layout/main/index.js b/docs/app/components/layout/main/index.js index 75a3f1ffd..eb2b76c1c 100644 --- a/docs/app/components/layout/main/index.js +++ b/docs/app/components/layout/main/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import { Button } from 'react-toolbox'; import Appbar from '../../../components/appbar'; @@ -21,13 +22,13 @@ const LoadExampleButton = props => ( ); LoadExampleButton.propTypes = { - onClick: React.PropTypes.func + onClick: PropTypes.func }; class Main extends React.Component { static propTypes = { - onClick: React.PropTypes.func, - params: React.PropTypes.object + onClick: PropTypes.func, + params: PropTypes.object }; state = { diff --git a/docs/app/components/logo/index.js b/docs/app/components/logo/index.js index 236391a6f..1cbf1e1c9 100644 --- a/docs/app/components/logo/index.js +++ b/docs/app/components/logo/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import style from './style.css'; const Logo = (props) => { @@ -16,7 +17,7 @@ const Logo = (props) => { }; Logo.propTypes = { - className: React.PropTypes.string + className: PropTypes.string }; export default Logo; diff --git a/docs/app/components/markdown/index.js b/docs/app/components/markdown/index.js index 3d85d7ab8..90c380fc3 100644 --- a/docs/app/components/markdown/index.js +++ b/docs/app/components/markdown/index.js @@ -1,5 +1,6 @@ import 'highlight.js/styles/github-gist'; import React from 'react'; +import PropTypes from 'prop-types'; import style from './style.css'; const Markdown = (props) => { @@ -14,8 +15,8 @@ const Markdown = (props) => { }; Markdown.propTypes = { - className: React.PropTypes.string, - markdown: React.PropTypes.string.isRequired + className: PropTypes.string, + markdown: PropTypes.string.isRequired }; Markdown.defaultProps = { diff --git a/docs/app/components/navigation/index.js b/docs/app/components/navigation/index.js index 950525d25..a475ebc58 100644 --- a/docs/app/components/navigation/index.js +++ b/docs/app/components/navigation/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Link } from 'react-router'; const Navigation = props => ( @@ -12,8 +13,8 @@ const Navigation = props => ( ); Navigation.propTypes = { - activeClassName: React.PropTypes.string, - className: React.PropTypes.string + activeClassName: PropTypes.string, + className: PropTypes.string }; diff --git a/docs/app/components/preview/index.js b/docs/app/components/preview/index.js index 414078eb4..5270b50c6 100644 --- a/docs/app/components/preview/index.js +++ b/docs/app/components/preview/index.js @@ -1,5 +1,6 @@ /* eslint-disable no-eval*/ import React from 'react'; +import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import { transform } from 'babel-standalone'; import * as ReactToolbox from 'react-toolbox'; @@ -9,9 +10,9 @@ const ERROR_TIMEOUT = 500; const Preview = React.createClass({ propTypes: { - className: React.PropTypes.string, - code: React.PropTypes.string.isRequired, - scope: React.PropTypes.object + className: PropTypes.string, + code: PropTypes.string.isRequired, + scope: PropTypes.object }, getDefaultProps () { diff --git a/package.json b/package.json index 4300d47cb..06051c866 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "postcss-mixins": "^5.4.0", "postcss-reporter": "^3.0.0", "pre-commit": "^1.2.2", + "prop-types": "^15.5.7", "react": "^15.4.2", "react-addons-test-utils": "^15.4.2", "react-dom": "^15.4.2", @@ -133,6 +134,7 @@ }, "peerDependencies": { "classnames": "^2.2.0", + "prop-types": "^15.5.7", "react": "^0.14 || ~15.4.0", "react-addons-css-transition-group": "^0.14.0 || ~15.4.0", "react-dom": "^0.14.0 || ~15.4.0" diff --git a/spec/components/dialog.js b/spec/components/dialog.js index 33e0ca7c9..480a72cd9 100644 --- a/spec/components/dialog.js +++ b/spec/components/dialog.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import Button from '../../components/button'; import Dialog from '../../components/dialog'; import Dropdown from '../../components/dropdown'; diff --git a/yarn.lock b/yarn.lock index 8b70e293f..612c9f185 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5734,6 +5734,12 @@ promise@^7.1.1: dependencies: asap "~2.0.3" +prop-types@^15.5.7: + version "15.5.7" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.7.tgz#231c4f29cdd82e355011d4889386ca9059544dd1" + dependencies: + fbjs "^0.8.9" + proxy-addr@~1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074"