diff --git a/package.json b/package.json
index f694c4c68..a96598931 100644
--- a/package.json
+++ b/package.json
@@ -116,7 +116,6 @@
"jscodeshift": "^0.11.0",
"mockdate": "^3.0.2",
"plop": "^2.4.0",
- "prop-types": "15.7.2",
"react": "17.0.2",
"react-color": "^2.18.1",
"react-dom": "17.0.2",
diff --git a/rollup.config.js b/rollup.config.js
index ab3f7b3fe..6e9d2ee56 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -15,7 +15,6 @@ const PEER_DEPENDENCIES = {
const GLOBALS = {
...PEER_DEPENDENCIES,
- "prop-types": "PropTypes",
"react-windowed-select": "components",
"@babel/runtime/helpers/typeof": "typeof",
"@babel/runtime/helpers/defineProperty": "defineProperty",
@@ -54,7 +53,7 @@ const CORE_PLUGINS = [
commonjs({
/* include: include all items in node_modules folders (in entire monorepo) */
include: [/node_modules/],
- /* namedExports: sometimes commonjs can't resolve named exports from certain libraries,
+ /* namedExports: sometimes commonjs can't resolve named exports from certain libraries,
ex: import {exportName} from "package-name"; => exportName module not found
in those cases, it needs to be added as ["package-name"]: "exportName" here */
namedExports: {
diff --git a/src/BrandedNavBar/NavBarDropdownMenu.tsx b/src/BrandedNavBar/NavBarDropdownMenu.tsx
index 90501e43a..cf58e55ca 100644
--- a/src/BrandedNavBar/NavBarDropdownMenu.tsx
+++ b/src/BrandedNavBar/NavBarDropdownMenu.tsx
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import { Manager, Reference, Popper } from "react-popper";
import { DetectOutsideClick, withMenuState, PopperArrow } from "../utils";
import DropdownMenuContainer from "../DropdownMenu/DropdownMenuContainer";
@@ -158,22 +157,6 @@ class StatelessNavBarDropdownMenu extends StatelessNavBarDropdownMenuClass {
}
/* eslint-enable react/destructuring-assignment */
-// @ts-ignore
-StatelessNavBarDropdownMenu.propTypes = {
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
- trigger: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
- menuState: PropTypes.shape({
- isOpen: PropTypes.bool,
- openMenu: PropTypes.func,
- closeMenu: PropTypes.func,
- toggleMenu: PropTypes.func,
- }).isRequired,
- showArrow: PropTypes.bool,
- placement: PropTypes.oneOf(["bottom-start", "right-start", "left-start"]),
- modifiers: PropTypes.shape({}),
- triggerTogglesMenuState: PropTypes.bool,
- dropdownMenuContainerEventHandlers: PropTypes.func,
-};
// @ts-ignore
StatelessNavBarDropdownMenu.defaultProps = {
showArrow: true,
diff --git a/src/Icon/Icon.story.tsx b/src/Icon/Icon.story.tsx
index d2c7cb96c..e09948820 100644
--- a/src/Icon/Icon.story.tsx
+++ b/src/Icon/Icon.story.tsx
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import icons from "@nulogy/icons";
import { Box, Flex, Icon, InlineIcon } from "../index";
@@ -16,10 +15,6 @@ const IconCode = ({ icon }) => (
);
-IconCode.propTypes = {
- icon: PropTypes.string.isRequired,
-};
-
export default {
title: "Components/Icon",
};
diff --git a/src/NavBar/DesktopMenu.tsx b/src/NavBar/DesktopMenu.tsx
index 14514126b..80a078b29 100644
--- a/src/NavBar/DesktopMenu.tsx
+++ b/src/NavBar/DesktopMenu.tsx
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import styled from "styled-components";
import type { CSSObject } from "styled-components";
import { themeGet } from "@styled-system/theme-get";
@@ -43,12 +42,6 @@ const ApplyMenuLinkStyles = styled.div<{
},
}));
-ApplyMenuLinkStyles.propTypes = {
- color: PropTypes.string,
- hoverColor: PropTypes.string,
- hoverBackground: PropTypes.string,
-};
-
ApplyMenuLinkStyles.defaultProps = {
color: theme.colors.white,
hoverColor: theme.colors.lightBlue,
@@ -126,11 +119,6 @@ const BaseDesktopMenu = ({ menuData, themeColorObject, ...props }) => (
);
-BaseDesktopMenu.propTypes = {
- menuData: PropTypes.arrayOf(PropTypes.shape({})),
- themeColorObject: PropTypes.shape({}),
-};
-
const DesktopMenu = styled(BaseDesktopMenu)({
"> div": {
":not(:last-of-type)": {
diff --git a/src/NavBar/MenuTrigger.tsx b/src/NavBar/MenuTrigger.tsx
index cccdabbfc..64a01823a 100644
--- a/src/NavBar/MenuTrigger.tsx
+++ b/src/NavBar/MenuTrigger.tsx
@@ -1,6 +1,5 @@
import React, { ReactNode } from "react";
import styled, { useTheme } from "styled-components";
-import PropTypes from "prop-types";
import { themeGet } from "@styled-system/theme-get";
import theme from "../theme";
import { Icon } from "../Icon";
@@ -47,12 +46,6 @@ const StyledButton = styled.button<{
},
}));
-StyledButton.propTypes = {
- color: PropTypes.string,
- hoverColor: PropTypes.string,
- hoverBackground: PropTypes.string,
-};
-
StyledButton.defaultProps = {};
const MenuTriggerButton = React.forwardRef(
@@ -70,13 +63,6 @@ const MenuTriggerButton = React.forwardRef(
)
);
-MenuTriggerButton.propTypes = {
- name: PropTypes.string.isRequired,
- color: PropTypes.string,
- hoverColor: PropTypes.string,
- hoverBackground: PropTypes.string,
-};
-
function MenuTrigger({
menuData,
name,
diff --git a/src/NavBar/MobileMenu.tsx b/src/NavBar/MobileMenu.tsx
index 15b946213..7113532cd 100644
--- a/src/NavBar/MobileMenu.tsx
+++ b/src/NavBar/MobileMenu.tsx
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import styled from "styled-components";
import type { CSSObject } from "styled-components";
import { display } from "styled-system";
@@ -56,13 +55,6 @@ const ApplyMenuLinkStyles = styled.li<{
},
}));
-ApplyMenuLinkStyles.propTypes = {
- layer: PropTypes.number,
- color: PropTypes.string,
- hoverColor: PropTypes.string,
- hoverBackground: PropTypes.string,
-};
-
ApplyMenuLinkStyles.defaultProps = {
layer: 0,
color: theme.colors.white,
@@ -178,22 +170,6 @@ const SubMenu = ({ menuItem, linkOnClick, themeColorObject, layer }) => (
>
);
-const ThemeColorObjectPropTypes = {
- textColor: PropTypes.string,
- background: PropTypes.string,
- logoColor: PropTypes.string,
-};
-
-SubMenu.propTypes = {
- layer: PropTypes.number.isRequired,
- menuItem: PropTypes.shape({
- items: PropTypes.arrayOf(PropTypes.shape({})),
- name: PropTypes.string.isRequired,
- }).isRequired,
- linkOnClick: PropTypes.func,
- themeColorObject: PropTypes.shape(ThemeColorObjectPropTypes),
-};
-
SubMenu.defaultProps = {
linkOnClick: null,
themeColorObject: undefined,
@@ -235,17 +211,6 @@ const BaseMobileMenu = ({ menuData, closeMenu, subtext, includeSubtext, themeCol
);
-BaseMobileMenu.propTypes = {
- menuData: PropTypes.shape({
- primaryMenu: PropTypes.arrayOf(PropTypes.shape({})),
- secondaryMenu: PropTypes.arrayOf(PropTypes.shape({})),
- }),
- subtext: PropTypes.string,
- includeSubtext: PropTypes.bool,
- closeMenu: PropTypes.func,
- themeColorObject: PropTypes.shape(ThemeColorObjectPropTypes),
-};
-
BaseMobileMenu.defaultProps = {
menuData: null,
subtext: null,
diff --git a/src/NavBar/NavBar.tsx b/src/NavBar/NavBar.tsx
index c982f9495..6120dc660 100644
--- a/src/NavBar/NavBar.tsx
+++ b/src/NavBar/NavBar.tsx
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import styled from "styled-components";
import { themeGet } from "@styled-system/theme-get";
import ReactResizeDetector from "react-resize-detector";
@@ -120,22 +119,6 @@ const MediumNavBar: React.FC> = ({
);
};
-export const MenuDataPropTypes = {
- primaryMenu: PropTypes.arrayOf(isValidMenuItem),
- secondaryMenu: PropTypes.arrayOf(isValidMenuItem),
- search: PropTypes.shape({
- onSubmit: PropTypes.func,
- }),
-};
-
-MediumNavBar.propTypes = {
- subtext: PropTypes.string,
- brandingLinkHref: PropTypes.string,
- menuData: PropTypes.shape(MenuDataPropTypes),
- brandingLinkTo: PropTypes.string,
- themeColor: PropTypes.oneOf(["blue", "white"]),
-};
-
MediumNavBar.defaultProps = {
subtext: null,
brandingLinkHref: "/",
@@ -192,10 +175,6 @@ export const MenuIcon = ({ isOpen }) => {
return ;
};
-MenuIcon.propTypes = {
- isOpen: PropTypes.bool,
-};
-
MenuIcon.defaultProps = {
isOpen: false,
};
@@ -219,13 +198,6 @@ const NavBar = (props) => (
);
-NavBar.propTypes = {
- menuData: PropTypes.shape(MenuDataPropTypes),
- className: PropTypes.string,
- breakpointUpper: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
- themeColor: PropTypes.oneOf(["blue", "white"]),
-};
-
NavBar.defaultProps = {
menuData: null,
className: undefined,
diff --git a/src/NavBar/NavBarDropdownMenu.tsx b/src/NavBar/NavBarDropdownMenu.tsx
index 60f215d93..9b21c031c 100644
--- a/src/NavBar/NavBarDropdownMenu.tsx
+++ b/src/NavBar/NavBarDropdownMenu.tsx
@@ -1,6 +1,5 @@
// @ts-nocheck
import React from "react";
-import PropTypes from "prop-types";
import { Manager, Reference, Popper } from "react-popper";
import { DetectOutsideClick, withMenuState, PopperArrow } from "../utils";
import DropdownMenuContainer from "../DropdownMenu/DropdownMenuContainer";
@@ -129,22 +128,6 @@ class StatelessNavBarDropdownMenu extends React.Component {
}
/* eslint-enable react/destructuring-assignment */
-StatelessNavBarDropdownMenu.propTypes = {
- children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
- trigger: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
- menuState: PropTypes.shape({
- isOpen: PropTypes.bool,
- openMenu: PropTypes.func,
- closeMenu: PropTypes.func,
- toggleMenu: PropTypes.func,
- }).isRequired,
- showArrow: PropTypes.bool,
- placement: PropTypes.oneOf(["bottom-start", "right-start"]),
- modifiers: PropTypes.shape({}),
- triggerTogglesMenuState: PropTypes.bool,
- dropdownMenuContainerEventHandlers: PropTypes.func,
-};
-
StatelessNavBarDropdownMenu.defaultProps = {
showArrow: true,
placement: "bottom-start",
@@ -155,11 +138,6 @@ StatelessNavBarDropdownMenu.defaultProps = {
const NavBarDropdownMenu = withMenuState(StatelessNavBarDropdownMenu);
-NavBarDropdownMenu.propTypes = {
- showDelay: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
- hideDelay: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
-};
-
NavBarDropdownMenu.defaultProps = {
showDelay: "0",
hideDelay: "100",
diff --git a/src/NavBar/SmallNavBar.tsx b/src/NavBar/SmallNavBar.tsx
index 0c082fc9d..429fa3245 100644
--- a/src/NavBar/SmallNavBar.tsx
+++ b/src/NavBar/SmallNavBar.tsx
@@ -1,6 +1,5 @@
// @ts-nocheck
import React from "react";
-import PropTypes from "prop-types";
import { Branding } from "../Branding";
import { Flex } from "../Flex";
import theme from "../theme";
@@ -10,7 +9,6 @@ import MobileMenu from "./MobileMenu";
import {
BrandingLink,
getThemeColor,
- MenuDataPropTypes,
MenuIcon,
MobileMenuTrigger,
NavBarBackground,
@@ -95,21 +93,6 @@ class SmallNavBarNoState extends React.Component {
}
}
-SmallNavBarNoState.propTypes = {
- menuState: PropTypes.shape({
- isOpen: PropTypes.bool,
- toggleMenu: PropTypes.func,
- closeMenu: PropTypes.func,
- }).isRequired,
- menuData: PropTypes.shape(MenuDataPropTypes),
- subtext: PropTypes.string,
- brandingLinkHref: PropTypes.string,
- brandingLinkTo: PropTypes.string,
- breakpointLower: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
- width: PropTypes.number,
- themeColor: PropTypes.oneOf(["blue", "white"]),
-};
-
SmallNavBarNoState.defaultProps = {
menuData: null,
subtext: null,
diff --git a/src/NavBar/SubMenuTrigger.tsx b/src/NavBar/SubMenuTrigger.tsx
index e4a332cb2..608511d47 100644
--- a/src/NavBar/SubMenuTrigger.tsx
+++ b/src/NavBar/SubMenuTrigger.tsx
@@ -1,6 +1,5 @@
import React from "react";
import styled from "styled-components";
-import PropTypes from "prop-types";
import theme from "../theme";
import { Icon } from "../Icon";
import NavBarDropdownMenu from "./NavBarDropdownMenu";
@@ -50,11 +49,6 @@ const SubMenuTriggerButton = React.forwardRef(({
));
-SubMenuTriggerButton.propTypes = {
- name: PropTypes.string.isRequired,
- isOpen: PropTypes.bool,
-};
-
SubMenuTriggerButton.defaultProps = {
isOpen: false,
};
@@ -83,12 +77,6 @@ const SubMenuTrigger = (props) => {
);
};
-SubMenuTrigger.propTypes = {
- name: PropTypes.string.isRequired,
- menuData: PropTypes.arrayOf(PropTypes.shape({})),
- onItemClick: PropTypes.func,
-};
-
SubMenuTrigger.defaultProps = {
menuData: null,
onItemClick: null,
diff --git a/src/NavBar/isValidMenuItem.tsx b/src/NavBar/isValidMenuItem.tsx
index 466596d72..e058cb3d7 100644
--- a/src/NavBar/isValidMenuItem.tsx
+++ b/src/NavBar/isValidMenuItem.tsx
@@ -1,5 +1,3 @@
-import PropTypes from "prop-types";
-
const isValidMenuItem = function validArrayItem(arr, idx, componentName, location, propFullName) {
const obj = arr[idx];
@@ -9,19 +7,6 @@ const isValidMenuItem = function validArrayItem(arr, idx, componentName, locatio
);
}
- PropTypes.checkPropTypes(
- {
- name: PropTypes.node.isRequired,
- ariaLabel: PropTypes.string,
- href: PropTypes.string,
- items: PropTypes.arrayOf(isValidMenuItem),
- render: PropTypes.func,
- },
- obj,
- propFullName,
- componentName
- );
-
let numberOfDefiningKeys = 0;
const definingKeys = ["href", "items", "render"];
const keys = Object.keys(obj);
diff --git a/src/NavBarSearch/NavBarSearch.js b/src/NavBarSearch/NavBarSearch.js
index 9e180c99a..6833d1688 100644
--- a/src/NavBarSearch/NavBarSearch.js
+++ b/src/NavBarSearch/NavBarSearch.js
@@ -1,6 +1,5 @@
import React from "react";
import styled from "styled-components";
-import PropTypes from "prop-types";
import { darken, transparentize } from "polished";
import { useTranslation } from "react-i18next";
import { Flex } from "../Flex";
@@ -73,11 +72,6 @@ const NavBarSearch = styled(BaseNavBarSearch)({
},
});
-BaseNavBarSearch.propTypes = {
- name: PropTypes.string,
- onSubmit: PropTypes.func,
-};
-
BaseNavBarSearch.defaultProps = {
name: "global-search",
onSubmit: () => {},
diff --git a/src/Switcher/Switch.tsx b/src/Switcher/Switch.tsx
index 46dc37352..6a8197b19 100644
--- a/src/Switcher/Switch.tsx
+++ b/src/Switcher/Switch.tsx
@@ -1,6 +1,5 @@
import React from "react";
import styled from "styled-components";
-import PropTypes from "prop-types";
import { variant } from "styled-system";
import numberFromDimension from "../utils/numberFromDimension";
import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
@@ -62,10 +61,4 @@ const SwitchButton = styled.button(
})
);
-Switch.propTypes = {
- children: PropTypes.node,
- selected: PropTypes.bool,
- value: PropTypes.string,
-};
-
export default Switch;
diff --git a/src/Switcher/Switcher.tsx b/src/Switcher/Switcher.tsx
index 66302c2a3..0c8a9a4ea 100644
--- a/src/Switcher/Switcher.tsx
+++ b/src/Switcher/Switcher.tsx
@@ -1,5 +1,4 @@
import React, { ReactElement } from "react";
-import PropTypes from "prop-types";
import { Box } from "../Box";
import FocusManager from "../utils/ts/FocusManager";
import type { ComponentSize } from "../NDSProvider/ComponentSizeContext";
@@ -63,10 +62,4 @@ const Switcher: React.FC> = ({ size, sele
);
};
-Switcher.propTypes = {
- children: PropTypes.arrayOf(PropTypes.element),
- selected: PropTypes.string,
- onChange: PropTypes.func,
-};
-
export default Switcher;
diff --git a/src/Table/StatefulTable.tsx b/src/Table/StatefulTable.tsx
index 82d534deb..efcc9a373 100644
--- a/src/Table/StatefulTable.tsx
+++ b/src/Table/StatefulTable.tsx
@@ -1,12 +1,27 @@
import React, { Component } from "react";
import propTypes from "@styled-system/prop-types";
-import PropTypes from "prop-types";
import { Pagination } from "../Pagination";
-import { getSubset } from "../utils/subset";
+import { pick } from "../utils/subset";
import BaseTable, { BaseTableProps } from "./BaseTable";
import { addExpandableControl } from "./addExpandableControl";
import { addSelectableControl } from "./addSelectableControl";
-import { rowsPropType } from "./Table.types";
+
+const propNames = [
+ ...Object.keys(propTypes.space),
+ "columns",
+ "rows",
+ "noRowsContent",
+ "keyField",
+ "id",
+ "loading",
+ "footerRows",
+ "rowHovers",
+ "compact",
+ "className",
+ "stickyHeader",
+ "onRowMouseEnter",
+ "onRowMouseLeave",
+];
export type StatefulTableProps = BaseTableProps & {
selectedRows?: string[];
@@ -238,7 +253,7 @@ class StatefulTable extends Component
@@ -261,21 +276,4 @@ class StatefulTable extends Component = {
} & ({ key: Key; dataKey?: never | undefined } | { dataKey: Key; key?: never | undefined });
export type Columns = ColumnType[];
-
-export const columnPropType = PropTypes.shape({
- align: PropTypes.oneOf(["right", "left", "center"]),
- label: PropTypes.string,
- dataKey: PropTypes.oneOf([PropTypes.string, PropTypes.number]),
- key: PropTypes.oneOf([PropTypes.string, PropTypes.number]),
- cellFormatter: PropTypes.func,
- cellRenderer: PropTypes.func,
- headerRenderer: PropTypes.func,
- width: PropTypes.string,
-});
-
-export const rowPropType = PropTypes.objectOf(
- PropTypes.oneOfType([
- PropTypes.number,
- PropTypes.string,
- PropTypes.bool,
- PropTypes.func,
- PropTypes.node,
- PropTypes.shape({}),
- ])
-);
-
-export const columnsPropType = PropTypes.arrayOf(columnPropType);
-
-export const rowsPropType = PropTypes.arrayOf(rowPropType);
diff --git a/src/Table/TableBody.tsx b/src/Table/TableBody.tsx
index d6582a929..36beeabd8 100644
--- a/src/Table/TableBody.tsx
+++ b/src/Table/TableBody.tsx
@@ -1,9 +1,7 @@
import React from "react";
-import PropTypes from "prop-types";
import styled from "styled-components";
import { Box } from "../Box";
import { DefaultNDSThemeType } from "../theme.type";
-import { columnsPropType, rowPropType } from "./Table.types";
import TableCell from "./TableCell";
const StyledMessageContainer = styled(Box)(({ theme }) => ({
@@ -107,10 +105,6 @@ const TableMessageContainer = ({ colSpan, children }) => (
const LoadingContent = ({ colSpan }) => Loading...;
-LoadingContent.propTypes = {
- colSpan: PropTypes.number.isRequired,
-};
-
type TableBodyProps = {
rows: any[];
columns: any[];
diff --git a/src/Table/TableFoot.tsx b/src/Table/TableFoot.tsx
index 0e9dcff48..b94aee96e 100644
--- a/src/Table/TableFoot.tsx
+++ b/src/Table/TableFoot.tsx
@@ -1,9 +1,8 @@
import React from "react";
-import PropTypes from "prop-types";
import styled from "styled-components";
import TableCell from "./TableCell";
import StyledTh from "./StyledTh";
-import { columnsPropType, rowPropType, RowType, Columns } from "./Table.types";
+import { RowType, Columns } from "./Table.types";
const StyledFooterRow = styled.tr(({ theme }) => ({
"&:first-of-type": {
@@ -48,13 +47,6 @@ const TableFooterRow = ({ row, columns, loading, compact }) => {
);
};
-TableFooterRow.propTypes = {
- row: rowPropType.isRequired,
- columns: columnsPropType.isRequired,
- loading: PropTypes.bool.isRequired,
- compact: PropTypes.bool.isRequired,
-};
-
function TableFoot({
columns,
rows,
diff --git a/src/utils/PopperArrow.tsx b/src/utils/PopperArrow.tsx
index 70dabe8da..b05ca578a 100644
--- a/src/utils/PopperArrow.tsx
+++ b/src/utils/PopperArrow.tsx
@@ -1,5 +1,4 @@
import styled from "styled-components";
-import PropTypes from "prop-types";
import { PopperArrowProps as ReactPopperArrowProps } from "react-popper";
import theme from "../theme";
diff --git a/src/utils/ScrollIndicators.js b/src/utils/ScrollIndicators.js
index c446502f0..c0b7dfc7a 100644
--- a/src/utils/ScrollIndicators.js
+++ b/src/utils/ScrollIndicators.js
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
import { Icon } from "../Icon";
import theme from "../theme";
@@ -90,8 +89,4 @@ class ScrollIndicators extends React.Component {
}
/* eslint-enable react/destructuring-assignment */
-ScrollIndicators.propTypes = {
- children: PropTypes.element.isRequired,
-};
-
export default ScrollIndicators;
diff --git a/src/utils/subset.js b/src/utils/subset.js
index 73f04489b..ac6c61899 100644
--- a/src/utils/subset.js
+++ b/src/utils/subset.js
@@ -12,7 +12,7 @@ export const omitSubset = (o, propObj) => {
}, {});
};
-const pick = (o, ...fields) => {
+export const pick = (o, ...fields) => {
const objectProps = Object.keys(o);
return fields.reduce((a, x) => {
if (objectProps.includes(x)) a[x] = o[x];
diff --git a/src/utils/withWindowDimensions.js b/src/utils/withWindowDimensions.js
index d3ec59142..409bd465b 100644
--- a/src/utils/withWindowDimensions.js
+++ b/src/utils/withWindowDimensions.js
@@ -1,5 +1,4 @@
import React from "react";
-import PropTypes from "prop-types";
class WindowDimensions extends React.Component {
constructor(props) {
@@ -32,15 +31,10 @@ class WindowDimensions extends React.Component {
}
}
-WindowDimensions.propTypes = {
- children: PropTypes.func.isRequired,
-};
-
-const withWindowDimensions = (Component) => (props) =>
- (
-
- {(windowDimensions) => }
-
- );
+const withWindowDimensions = (Component) => (props) => (
+
+ {(windowDimensions) => }
+
+);
export default withWindowDimensions;
diff --git a/yarn.lock b/yarn.lock
index 13e15d284..7a6e677e5 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -16432,7 +16432,7 @@ promzard@^0.3.0:
dependencies:
read "1"
-prop-types@15.7.2, prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
+prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==