diff --git a/UNRELEASED-V4.md b/UNRELEASED-V4.md index f02278be716..60bee608297 100644 --- a/UNRELEASED-V4.md +++ b/UNRELEASED-V4.md @@ -20,7 +20,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f ### Dependency upgrades -- Update `react` to 16.8.6 and `enzyme` to 3.9.1 ([#1392](https://github.com/Shopify/polaris-react/pull/1392)) +- Removed `@types/prop-types` and `prop-types` ([#1505](https://github.com/Shopify/polaris-react/pull/1505)) +- Updated`react` to 16.8.6 and `enzyme` to 3.9.1 ([#1392](https://github.com/Shopify/polaris-react/pull/1392)) ### Code quality diff --git a/package.json b/package.json index 20f77b51874..f934a16f9fd 100644 --- a/package.json +++ b/package.json @@ -182,14 +182,12 @@ "@shopify/polaris-tokens": "^2.3.0", "@shopify/react-compose": "^0.1.6", "@shopify/react-utilities": "^2.0.3", - "@types/prop-types": "^15.5.5", "@types/react": "^16.8.15", "@types/react-dom": "^16.8.4", "@types/react-transition-group": "^2.0.7", "core-js": "^2.5.1", "hoist-non-react-statics": "^2.5.0", "lodash": "^4.17.4", - "prop-types": "^15.6.1", "react-transition-group": "^2.4.0", "tslib": "^1.9.3" } diff --git a/src/components/Navigation/types.ts b/src/components/Navigation/types.ts index 552fd477ba0..d6187b73b7a 100644 --- a/src/components/Navigation/types.ts +++ b/src/components/Navigation/types.ts @@ -1,4 +1,3 @@ -import * as PropTypes from 'prop-types'; import {Props as IconProps} from '../Icon'; export interface ItemType { @@ -12,8 +11,3 @@ export interface SectionType { fill?: boolean; items?: ItemType[]; } - -export const contextTypes = { - location: PropTypes.string, - onNavigationDismiss: PropTypes.func, -}; diff --git a/src/components/ThemeProvider/index.ts b/src/components/ThemeProvider/index.ts index b083320a5b3..c5523eec99c 100644 --- a/src/components/ThemeProvider/index.ts +++ b/src/components/ThemeProvider/index.ts @@ -1,12 +1,6 @@ import ThemeProvider from './ThemeProvider'; -export { - Theme, - ColorsToParse, - ThemeVariant, - ThemeColors, - THEME_CONTEXT_TYPES, -} from './types'; +export {Theme, ColorsToParse, ThemeVariant, ThemeColors} from './types'; export { default as ThemeProviderContext, ThemeProviderContextType, diff --git a/src/components/ThemeProvider/types.ts b/src/components/ThemeProvider/types.ts index dde38de5ea1..8838f82a6c1 100644 --- a/src/components/ThemeProvider/types.ts +++ b/src/components/ThemeProvider/types.ts @@ -1,5 +1,3 @@ -import * as PropTypes from 'prop-types'; - export type ColorsToParse = ThemeColor; export type ThemeLogo = { @@ -35,5 +33,3 @@ export interface Theme { } export type ThemeVariant = 'light' | 'dark'; - -export const THEME_CONTEXT_TYPES = {polarisTheme: PropTypes.any}; diff --git a/yarn.lock b/yarn.lock index ed10c9342e2..f9c8eb2c141 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1768,7 +1768,7 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.17.tgz#d48cf10f0dc6dcf59f827f5a3fc7a4a6004318d3" integrity sha512-3N3FRd/rA1v5glXjb90YdYUa+sOB7WrkU2rAhKZnF4TKD86Cym9swtulGuH0p9nxo7fP5woRNa8b0oFTpCO1bg== -"@types/prop-types@*", "@types/prop-types@^15.5.5": +"@types/prop-types@*": version "15.5.5" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.5.tgz#17038dd322c2325f5da650a94d5f9974943625e3" integrity sha512-mOrlCEdwX3seT3n0AXNt4KNPAZZxcsABUHwBgFXOt+nvFUXkxCAO6UBJHPrDxWEa2KDMil86355fjo8jbZ+K0Q==