diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-29 09:58:06 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-29 10:04:33 -0300 |
commit | 3dd1047b085fa7795f322c5829f39208465bff13 (patch) | |
tree | 19340ca9420466e7059849dbf7013901733c0fde /packages/taler-wallet-webextension/src/mui/input/InputBase.tsx | |
parent | cb18b9813e5df6e315dfb1827f5f7cf304977390 (diff) | |
download | wallet-core-3dd1047b085fa7795f322c5829f39208465bff13.tar.xz |
added react eslint and fix most of the warns
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/input/InputBase.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/mui/input/InputBase.tsx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx index 331d9ce95..a25366bd2 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx @@ -1,5 +1,5 @@ import { css } from "@linaria/core"; -import { h, JSX } from "preact"; +import { h, JSX, VNode } from "preact"; import { useLayoutEffect } from "preact/hooks"; // eslint-disable-next-line import/extensions import { theme } from "../style"; @@ -33,7 +33,7 @@ export function InputBaseRoot({ focused, fullWidth, children, -}: any) { +}: any): VNode { const fcs = useFormControl({}); return ( <div @@ -129,7 +129,7 @@ export function InputBaseComponent({ multiline, type, ...props -}: any) { +}: any): VNode { return ( <input disabled={disabled} @@ -160,7 +160,7 @@ export function InputBase({ value, onClick, ...props -}: any) { +}: any): VNode { const fcs = useFormControl(props); // const [focused, setFocused] = useState(false); useLayoutEffect(() => { @@ -171,7 +171,7 @@ export function InputBase({ } }, [value]); - const handleFocus = (event: JSX.TargetedFocusEvent<EventTarget>) => { + const handleFocus = (event: JSX.TargetedFocusEvent<EventTarget>): void => { // Fix a bug with IE11 where the focus/blur events are triggered // while the component is disabled. if (fcs.disabled) { @@ -189,7 +189,7 @@ export function InputBase({ fcs.onFocus(); }; - const handleBlur = () => { + const handleBlur = (): void => { // if (onBlur) { // onBlur(event); // } @@ -202,7 +202,7 @@ export function InputBase({ const handleChange = ( event: JSX.TargetedEvent<HTMLElement & { value?: string }>, - ) => { + ): void => { // if (inputPropsProp.onChange) { // inputPropsProp.onChange(event, ...args); // } @@ -215,7 +215,7 @@ export function InputBase({ const handleClick = ( event: JSX.TargetedMouseEvent<HTMLElement & { value?: string }>, - ) => { + ): void => { // if (inputRef.current && event.currentTarget === event.target) { // inputRef.current.focus(); // } @@ -254,6 +254,6 @@ export function InputBase({ ); } -export function TextareaAutoSize() { +export function TextareaAutoSize(): VNode { return <input onClick={(e) => null} />; } |