diff options
Diffstat (limited to 'packages/forms/src')
-rw-r--r-- | packages/forms/src/button/index.tsx | 6 | ||||
-rw-r--r-- | packages/forms/src/error/index.tsx | 2 | ||||
-rw-r--r-- | packages/forms/src/input/index.tsx | 4 | ||||
-rw-r--r-- | packages/forms/src/label/index.tsx | 6 | ||||
-rw-r--r-- | packages/forms/src/select/index.tsx | 4 | ||||
-rw-r--r-- | packages/forms/src/textarea/index.tsx | 4 | ||||
-rw-r--r-- | packages/forms/src/toggle/index.tsx | 4 | ||||
-rw-r--r-- | packages/forms/src/wrapper/index.tsx | 4 |
8 files changed, 15 insertions, 19 deletions
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 @@ | |||
1 | import Icon from '@mdi/react'; | 1 | import Icon from '@mdi/react'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Property } from 'csstype'; | 3 | import { Property } from 'csstype'; |
4 | import React, { Component } from 'react'; | 4 | import { Component, MouseEvent } from 'react'; |
5 | import injectStyle, { withTheme } from 'react-jss'; | 5 | import injectStyle, { withTheme } from 'react-jss'; |
6 | import Loader from 'react-loader'; | 6 | import Loader from 'react-loader'; |
7 | 7 | ||
@@ -22,9 +22,7 @@ interface IProps extends IFormField, IWithStyle { | |||
22 | id?: string; | 22 | id?: string; |
23 | type?: 'button' | 'reset' | 'submit' | undefined; | 23 | type?: 'button' | 'reset' | 'submit' | undefined; |
24 | onClick: ( | 24 | onClick: ( |
25 | event: | 25 | event: MouseEvent<HTMLButtonElement> | MouseEvent<HTMLAnchorElement>, |
26 | | React.MouseEvent<HTMLButtonElement> | ||
27 | | React.MouseEvent<HTMLAnchorElement>, | ||
28 | ) => void; | 26 | ) => void; |
29 | buttonType?: ButtonType; | 27 | buttonType?: ButtonType; |
30 | stretch?: boolean; | 28 | 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 @@ | |||
1 | import { Classes } from 'jss'; | 1 | import { Classes } from 'jss'; |
2 | import React, { Component } from 'react'; | 2 | import { Component } from 'react'; |
3 | import injectSheet from 'react-jss'; | 3 | import injectSheet from 'react-jss'; |
4 | 4 | ||
5 | import styles from './styles'; | 5 | 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 @@ | |||
1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; | 1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; |
2 | import Icon from '@mdi/react'; | 2 | import Icon from '@mdi/react'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import React, { Component, createRef } from 'react'; | 4 | import { Component, createRef, InputHTMLAttributes } from 'react'; |
5 | import injectSheet from 'react-jss'; | 5 | import injectSheet from 'react-jss'; |
6 | 6 | ||
7 | import { IFormField, IWithStyle } from '../typings/generic'; | 7 | import { IFormField, IWithStyle } from '../typings/generic'; |
@@ -18,7 +18,7 @@ interface IData { | |||
18 | } | 18 | } |
19 | 19 | ||
20 | interface IProps | 20 | interface IProps |
21 | extends React.InputHTMLAttributes<HTMLInputElement>, | 21 | extends InputHTMLAttributes<HTMLInputElement>, |
22 | IFormField, | 22 | IFormField, |
23 | IWithStyle { | 23 | IWithStyle { |
24 | focus?: boolean; | 24 | 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 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Classes } from 'jss'; | 2 | import { Classes } from 'jss'; |
3 | import React, { Component } from 'react'; | 3 | import { Component, LabelHTMLAttributes } from 'react'; |
4 | import injectSheet from 'react-jss'; | 4 | import injectSheet from 'react-jss'; |
5 | 5 | ||
6 | import { IFormField } from '../typings/generic'; | 6 | import { IFormField } from '../typings/generic'; |
7 | 7 | ||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
10 | interface ILabel | 10 | interface ILabel extends IFormField, LabelHTMLAttributes<HTMLLabelElement> { |
11 | extends IFormField, | ||
12 | React.LabelHTMLAttributes<HTMLLabelElement> { | ||
13 | classes: Classes; | 11 | classes: Classes; |
14 | isRequired: boolean; | 12 | isRequired: boolean; |
15 | } | 13 | } |
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 { | |||
5 | } from '@mdi/js'; | 5 | } from '@mdi/js'; |
6 | import Icon from '@mdi/react'; | 6 | import Icon from '@mdi/react'; |
7 | import classnames from 'classnames'; | 7 | import classnames from 'classnames'; |
8 | import React, { Component, createRef } from 'react'; | 8 | import { ChangeEvent, Component, createRef } from 'react'; |
9 | import injectStyle from 'react-jss'; | 9 | import injectStyle from 'react-jss'; |
10 | 10 | ||
11 | import { IFormField, IWithStyle } from '../typings/generic'; | 11 | import { IFormField, IWithStyle } from '../typings/generic'; |
@@ -33,7 +33,7 @@ interface IProps extends IFormField, IWithStyle { | |||
33 | name: string; | 33 | name: string; |
34 | options: IOptions; | 34 | options: IOptions; |
35 | value: string; | 35 | value: string; |
36 | onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | 36 | onChange: (event: ChangeEvent<HTMLInputElement>) => void; |
37 | showSearch: boolean; | 37 | showSearch: boolean; |
38 | data: IData; | 38 | data: IData; |
39 | } | 39 | } |
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 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import React, { Component, createRef } from 'react'; | 2 | import { Component, createRef, TextareaHTMLAttributes } from 'react'; |
3 | import injectSheet from 'react-jss'; | 3 | import injectSheet from 'react-jss'; |
4 | 4 | ||
5 | import { IFormField, IWithStyle } from '../typings/generic'; | 5 | import { IFormField, IWithStyle } from '../typings/generic'; |
@@ -15,7 +15,7 @@ interface IData { | |||
15 | } | 15 | } |
16 | 16 | ||
17 | interface IProps | 17 | interface IProps |
18 | extends React.TextareaHTMLAttributes<HTMLTextAreaElement>, | 18 | extends TextareaHTMLAttributes<HTMLTextAreaElement>, |
19 | IFormField, | 19 | IFormField, |
20 | IWithStyle { | 20 | IWithStyle { |
21 | focus?: boolean; | 21 | 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 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Property } from 'csstype'; | 2 | import { Property } from 'csstype'; |
3 | import React, { Component } from 'react'; | 3 | import { Component, InputHTMLAttributes } from 'react'; |
4 | import injectStyle from 'react-jss'; | 4 | import injectStyle from 'react-jss'; |
5 | 5 | ||
6 | import { IFormField, IWithStyle } from '../typings/generic'; | 6 | import { IFormField, IWithStyle } from '../typings/generic'; |
@@ -11,7 +11,7 @@ import { Label } from '../label'; | |||
11 | import { Wrapper } from '../wrapper'; | 11 | import { Wrapper } from '../wrapper'; |
12 | 12 | ||
13 | interface IProps | 13 | interface IProps |
14 | extends React.InputHTMLAttributes<HTMLInputElement>, | 14 | extends InputHTMLAttributes<HTMLInputElement>, |
15 | IFormField, | 15 | IFormField, |
16 | IWithStyle { | 16 | IWithStyle { |
17 | className?: string; | 17 | 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 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import React, { Component } from 'react'; | 2 | import { Component, ReactNode } from 'react'; |
3 | import injectStyle from 'react-jss'; | 3 | import injectStyle from 'react-jss'; |
4 | import { IWithStyle } from '../typings/generic'; | 4 | import { IWithStyle } from '../typings/generic'; |
5 | 5 | ||
6 | interface IProps extends IWithStyle { | 6 | interface IProps extends IWithStyle { |
7 | children: React.ReactNode; | 7 | children: ReactNode; |
8 | className?: string; | 8 | className?: string; |
9 | identifier: string; | 9 | identifier: string; |
10 | noMargin?: boolean; | 10 | noMargin?: boolean; |