From 31f8ada876b3aec45ffffcf82079eaacb69349fc Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Thu, 7 Oct 2021 08:03:45 +0200 Subject: chore: upgrade react to latest (#2030) --- packages/forms/src/button/index.tsx | 6 ++---- packages/forms/src/error/index.tsx | 2 +- packages/forms/src/input/index.tsx | 4 ++-- packages/forms/src/label/index.tsx | 6 ++---- packages/forms/src/select/index.tsx | 4 ++-- packages/forms/src/textarea/index.tsx | 4 ++-- packages/forms/src/toggle/index.tsx | 4 ++-- packages/forms/src/wrapper/index.tsx | 4 ++-- 8 files changed, 15 insertions(+), 19 deletions(-) (limited to 'packages/forms/src') diff --git a/packages/forms/src/button/index.tsx b/packages/forms/src/button/index.tsx index c9ae47d55..d9f372c4b 100644 --- a/packages/forms/src/button/index.tsx +++ b/packages/forms/src/button/index.tsx @@ -1,7 +1,7 @@ import Icon from '@mdi/react'; import classnames from 'classnames'; import { Property } from 'csstype'; -import React, { Component } from 'react'; +import { Component, MouseEvent } from 'react'; import injectStyle, { withTheme } from 'react-jss'; import Loader from 'react-loader'; @@ -22,9 +22,7 @@ interface IProps extends IFormField, IWithStyle { id?: string; type?: 'button' | 'reset' | 'submit' | undefined; onClick: ( - event: - | React.MouseEvent - | React.MouseEvent, + event: MouseEvent | MouseEvent, ) => void; buttonType?: ButtonType; stretch?: boolean; diff --git a/packages/forms/src/error/index.tsx b/packages/forms/src/error/index.tsx index 243321d97..8439bfc8b 100644 --- a/packages/forms/src/error/index.tsx +++ b/packages/forms/src/error/index.tsx @@ -1,5 +1,5 @@ import { Classes } from 'jss'; -import React, { Component } from 'react'; +import { Component } from 'react'; import injectSheet from 'react-jss'; import styles from './styles'; diff --git a/packages/forms/src/input/index.tsx b/packages/forms/src/input/index.tsx index 41751710a..0b16fe688 100644 --- a/packages/forms/src/input/index.tsx +++ b/packages/forms/src/input/index.tsx @@ -1,7 +1,7 @@ import { mdiEye, mdiEyeOff } from '@mdi/js'; import Icon from '@mdi/react'; import classnames from 'classnames'; -import React, { Component, createRef } from 'react'; +import { Component, createRef, InputHTMLAttributes } from 'react'; import injectSheet from 'react-jss'; import { IFormField, IWithStyle } from '../typings/generic'; @@ -18,7 +18,7 @@ interface IData { } interface IProps - extends React.InputHTMLAttributes, + extends InputHTMLAttributes, IFormField, IWithStyle { focus?: boolean; diff --git a/packages/forms/src/label/index.tsx b/packages/forms/src/label/index.tsx index ad503b785..4d86f23f7 100644 --- a/packages/forms/src/label/index.tsx +++ b/packages/forms/src/label/index.tsx @@ -1,15 +1,13 @@ import classnames from 'classnames'; import { Classes } from 'jss'; -import React, { Component } from 'react'; +import { Component, LabelHTMLAttributes } from 'react'; import injectSheet from 'react-jss'; import { IFormField } from '../typings/generic'; import styles from './styles'; -interface ILabel - extends IFormField, - React.LabelHTMLAttributes { +interface ILabel extends IFormField, LabelHTMLAttributes { classes: Classes; isRequired: boolean; } diff --git a/packages/forms/src/select/index.tsx b/packages/forms/src/select/index.tsx index 7806baa2a..d965d3c93 100644 --- a/packages/forms/src/select/index.tsx +++ b/packages/forms/src/select/index.tsx @@ -5,7 +5,7 @@ import { } from '@mdi/js'; import Icon from '@mdi/react'; import classnames from 'classnames'; -import React, { Component, createRef } from 'react'; +import { ChangeEvent, Component, createRef } from 'react'; import injectStyle from 'react-jss'; import { IFormField, IWithStyle } from '../typings/generic'; @@ -33,7 +33,7 @@ interface IProps extends IFormField, IWithStyle { name: string; options: IOptions; value: string; - onChange: (event: React.ChangeEvent) => void; + onChange: (event: ChangeEvent) => void; showSearch: boolean; data: IData; } diff --git a/packages/forms/src/textarea/index.tsx b/packages/forms/src/textarea/index.tsx index 2d89d1c9f..1b16698eb 100644 --- a/packages/forms/src/textarea/index.tsx +++ b/packages/forms/src/textarea/index.tsx @@ -1,5 +1,5 @@ import classnames from 'classnames'; -import React, { Component, createRef } from 'react'; +import { Component, createRef, TextareaHTMLAttributes } from 'react'; import injectSheet from 'react-jss'; import { IFormField, IWithStyle } from '../typings/generic'; @@ -15,7 +15,7 @@ interface IData { } interface IProps - extends React.TextareaHTMLAttributes, + extends TextareaHTMLAttributes, IFormField, IWithStyle { focus?: boolean; diff --git a/packages/forms/src/toggle/index.tsx b/packages/forms/src/toggle/index.tsx index bdf1d22cf..f9ef5775a 100644 --- a/packages/forms/src/toggle/index.tsx +++ b/packages/forms/src/toggle/index.tsx @@ -1,6 +1,6 @@ import classnames from 'classnames'; import { Property } from 'csstype'; -import React, { Component } from 'react'; +import { Component, InputHTMLAttributes } from 'react'; import injectStyle from 'react-jss'; import { IFormField, IWithStyle } from '../typings/generic'; @@ -11,7 +11,7 @@ import { Label } from '../label'; import { Wrapper } from '../wrapper'; interface IProps - extends React.InputHTMLAttributes, + extends InputHTMLAttributes, IFormField, IWithStyle { className?: string; diff --git a/packages/forms/src/wrapper/index.tsx b/packages/forms/src/wrapper/index.tsx index 3ae551e2c..ffcd6fe0b 100644 --- a/packages/forms/src/wrapper/index.tsx +++ b/packages/forms/src/wrapper/index.tsx @@ -1,10 +1,10 @@ import classnames from 'classnames'; -import React, { Component } from 'react'; +import { Component, ReactNode } from 'react'; import injectStyle from 'react-jss'; import { IWithStyle } from '../typings/generic'; interface IProps extends IWithStyle { - children: React.ReactNode; + children: ReactNode; className?: string; identifier: string; noMargin?: boolean; -- cgit v1.2.3-70-g09d2