From 46211e99d5565258921423b56a9cca4bd6c73689 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 22 Aug 2017 09:59:48 -0700 Subject: [PATCH] Use prop-types for RN CLI instead of deprecated react PropTypes --- .../storybook/stories/Button/index.android.js | 3 ++- .../crna-kitchen-sink/storybook/stories/Button/index.ios.js | 3 ++- .../crna-kitchen-sink/storybook/stories/CenterView/index.js | 3 ++- examples/crna-kitchen-sink/storybook/stories/Welcome/index.js | 3 ++- .../storybook/stories/Button/index.android.js | 3 ++- .../react-native-vanilla/storybook/stories/Button/index.ios.js | 3 ++- .../react-native-vanilla/storybook/stories/CenterView/index.js | 3 ++- .../react-native-vanilla/storybook/stories/Welcome/index.js | 3 ++- .../template/storybook/stories/Button/index.android.js | 3 ++- .../template/storybook/stories/Button/index.ios.js | 3 ++- .../template/storybook/stories/CenterView/index.js | 3 ++- .../REACT_NATIVE/template/storybook/stories/Welcome/index.js | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/examples/crna-kitchen-sink/storybook/stories/Button/index.android.js b/examples/crna-kitchen-sink/storybook/stories/Button/index.android.js index 7a285bc65e46..751662956de6 100644 --- a/examples/crna-kitchen-sink/storybook/stories/Button/index.android.js +++ b/examples/crna-kitchen-sink/storybook/stories/Button/index.android.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { TouchableNativeFeedback } from 'react-native'; export default function Button(props) { diff --git a/examples/crna-kitchen-sink/storybook/stories/Button/index.ios.js b/examples/crna-kitchen-sink/storybook/stories/Button/index.ios.js index 035cacc61e99..4886626bfade 100644 --- a/examples/crna-kitchen-sink/storybook/stories/Button/index.ios.js +++ b/examples/crna-kitchen-sink/storybook/stories/Button/index.ios.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { TouchableHighlight } from 'react-native'; export default function Button(props) { diff --git a/examples/crna-kitchen-sink/storybook/stories/CenterView/index.js b/examples/crna-kitchen-sink/storybook/stories/CenterView/index.js index e6c8fc60ee19..dcf34c73a04a 100644 --- a/examples/crna-kitchen-sink/storybook/stories/CenterView/index.js +++ b/examples/crna-kitchen-sink/storybook/stories/CenterView/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { View } from 'react-native'; import style from './style'; diff --git a/examples/crna-kitchen-sink/storybook/stories/Welcome/index.js b/examples/crna-kitchen-sink/storybook/stories/Welcome/index.js index 1106a2ba934d..f01c937315fe 100644 --- a/examples/crna-kitchen-sink/storybook/stories/Welcome/index.js +++ b/examples/crna-kitchen-sink/storybook/stories/Welcome/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { View, Text } from 'react-native'; export default class Welcome extends React.Component { diff --git a/examples/react-native-vanilla/storybook/stories/Button/index.android.js b/examples/react-native-vanilla/storybook/stories/Button/index.android.js index 7a285bc65e46..751662956de6 100644 --- a/examples/react-native-vanilla/storybook/stories/Button/index.android.js +++ b/examples/react-native-vanilla/storybook/stories/Button/index.android.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { TouchableNativeFeedback } from 'react-native'; export default function Button(props) { diff --git a/examples/react-native-vanilla/storybook/stories/Button/index.ios.js b/examples/react-native-vanilla/storybook/stories/Button/index.ios.js index 035cacc61e99..4886626bfade 100644 --- a/examples/react-native-vanilla/storybook/stories/Button/index.ios.js +++ b/examples/react-native-vanilla/storybook/stories/Button/index.ios.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { TouchableHighlight } from 'react-native'; export default function Button(props) { diff --git a/examples/react-native-vanilla/storybook/stories/CenterView/index.js b/examples/react-native-vanilla/storybook/stories/CenterView/index.js index e6c8fc60ee19..dcf34c73a04a 100644 --- a/examples/react-native-vanilla/storybook/stories/CenterView/index.js +++ b/examples/react-native-vanilla/storybook/stories/CenterView/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { View } from 'react-native'; import style from './style'; diff --git a/examples/react-native-vanilla/storybook/stories/Welcome/index.js b/examples/react-native-vanilla/storybook/stories/Welcome/index.js index 1106a2ba934d..f01c937315fe 100644 --- a/examples/react-native-vanilla/storybook/stories/Welcome/index.js +++ b/examples/react-native-vanilla/storybook/stories/Welcome/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { View, Text } from 'react-native'; export default class Welcome extends React.Component { diff --git a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.android.js b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.android.js index 2cae885acda5..fe87b8224d5e 100644 --- a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.android.js +++ b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.android.js @@ -1,6 +1,7 @@ /* eslint-disable import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { TouchableNativeFeedback } from 'react-native'; export default function Button(props) { diff --git a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.ios.js b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.ios.js index 9c32872772ab..4904d2a75515 100644 --- a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.ios.js +++ b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Button/index.ios.js @@ -1,6 +1,7 @@ /* eslint-disable import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { TouchableHighlight } from 'react-native'; export default function Button(props) { diff --git a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/CenterView/index.js b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/CenterView/index.js index 1ae222fc4858..3210d678ac5a 100644 --- a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/CenterView/index.js +++ b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/CenterView/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { View } from 'react-native'; import style from './style'; diff --git a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js index fd1c4d184a44..7afe65f6ffd2 100644 --- a/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js +++ b/lib/cli/generators/REACT_NATIVE/template/storybook/stories/Welcome/index.js @@ -1,6 +1,7 @@ /* eslint-disable import/extensions */ -import React, { PropTypes } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { View, Text } from 'react-native'; export default class Welcome extends React.Component {