From 2bbb1cff09e103e5763317d9fb85282e7e5d5c30 Mon Sep 17 00:00:00 2001 From: Paul Hachmang Date: Tue, 18 Jan 2022 12:07:21 +0100 Subject: [PATCH] chore: remove propTypes extension as a PR is pending in @material/ui https://github.com/mui-org/material-ui/pull/30682 --- packages/next-ui/Button/Button.tsx | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/packages/next-ui/Button/Button.tsx b/packages/next-ui/Button/Button.tsx index 6ad54804c1..53d4a1d337 100644 --- a/packages/next-ui/Button/Button.tsx +++ b/packages/next-ui/Button/Button.tsx @@ -1,32 +1,5 @@ /* eslint-disable react/forbid-foreign-prop-types */ import { LoadingButton as Button, LoadingButtonProps } from '@mui/lab' -import PropTypes, { Requireable } from 'prop-types' - -/** - * This is temporary until Material UI solves that the variant proptype is not: - * - * ```ts - * variant: PropTypes.oneOf(['contained', 'outlined', 'text']) - * ``` - * - * It should be something like - * - * ```ts - * variant: PropTypes.oneOfType([ - * PropTypes.oneOf(['contained', 'outlined', 'text']), - * PropTypes.string, - * ]), - * ``` - * - * https://github.com/mui-org/material-ui/blob/master/packages/mui-lab/src/LoadingButton/LoadingButton.js#L269 - */ -type LoadingButtonPropTypes = typeof Button & { propTypes: Record> } -if (process.env.NODE_ENV !== 'production' && (Button as LoadingButtonPropTypes).propTypes) { - ;(Button as LoadingButtonPropTypes).propTypes.variant = PropTypes.oneOfType([ - (Button as LoadingButtonPropTypes).propTypes.variant, - PropTypes.string, - ]) -} export type ButtonProps = LoadingButtonProps export { Button }