diff options
author | Sebastian <sebasjm@gmail.com> | 2022-03-28 23:41:07 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-03-28 23:41:07 -0300 |
commit | e2651bdff2eac072ed2394f69e2cf59a8c53cdba (patch) | |
tree | 77dc6629a223fcf57d8b6547dde0461940e0244a /packages/taler-wallet-webextension/src/mui/input | |
parent | f5d194dfc61ae0d358a27b994861dc20b83cf98e (diff) | |
download | wallet-core-e2651bdff2eac072ed2394f69e2cf59a8c53cdba.tar.xz |
add extension to every import
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/input')
6 files changed, 20 insertions, 14 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx b/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx index 7a8395705..d4fa0368e 100644 --- a/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/FormControl.tsx @@ -1,6 +1,7 @@ import { css } from "@linaria/core"; import { ComponentChildren, createContext, h } from "preact"; import { useContext, useState } from "preact/hooks"; +// eslint-disable-next-line import/extensions import { Colors } from "../style"; export interface Props { @@ -43,6 +44,8 @@ const fullWidthStyle = css` width: 100%; `; +export const FormControlContext = createContext<FCCProps | null>(null); + export function FormControl({ color = "primary", disabled = false, @@ -121,8 +124,6 @@ export interface FCCProps { variant: "filled" | "outlined" | "standard"; } -export const FormControlContext = createContext<FCCProps | null>(null); - const defaultContextValue: FCCProps = { color: "primary", disabled: false, @@ -132,10 +133,10 @@ const defaultContextValue: FCCProps = { fullWidth: false, hiddenLabel: false, size: "medium", - onBlur: () => {}, - onEmpty: () => {}, - onFilled: () => {}, - onFocus: () => {}, + onBlur: () => null, + onEmpty: () => null, + onFilled: () => null, + onFocus: () => null, required: false, variant: "outlined", }; diff --git a/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx b/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx index 4854a6384..da10eec11 100644 --- a/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/FormHelperText.tsx @@ -1,7 +1,8 @@ import { css } from "@linaria/core"; import { ComponentChildren, h } from "preact"; +// eslint-disable-next-line import/extensions import { theme } from "../style"; -import { useFormControl } from "./FormControl"; +import { useFormControl } from "./FormControl.js"; const root = css` color: ${theme.palette.text.secondary}; diff --git a/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx b/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx index e5ca53263..fffef41db 100644 --- a/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/FormLabel.tsx @@ -1,7 +1,8 @@ import { css } from "@linaria/core"; import { ComponentChildren, h } from "preact"; +// eslint-disable-next-line import/extensions import { Colors, theme } from "../style"; -import { useFormControl } from "./FormControl"; +import { useFormControl } from "./FormControl.js"; export interface Props { class?: string; diff --git a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx index 5714eb1ba..331d9ce95 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputBase.tsx @@ -1,8 +1,9 @@ import { css } from "@linaria/core"; import { h, JSX } from "preact"; -import { useEffect, useLayoutEffect, useState } from "preact/hooks"; +import { useLayoutEffect } from "preact/hooks"; +// eslint-disable-next-line import/extensions import { theme } from "../style"; -import { FormControlContext, useFormControl } from "./FormControl"; +import { FormControlContext, useFormControl } from "./FormControl.js"; const rootStyle = css` color: ${theme.palette.text.primary}; diff --git a/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx b/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx index c70c5bfc0..6d6aae4f3 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputLabel.tsx @@ -1,8 +1,9 @@ import { css } from "@linaria/core"; import { ComponentChildren, h } from "preact"; +// eslint-disable-next-line import/extensions import { Colors, theme } from "../style"; -import { useFormControl } from "./FormControl"; -import { FormLabel } from "./FormLabel"; +import { useFormControl } from "./FormControl.js"; +import { FormLabel } from "./FormLabel.js"; const root = css` display: block; diff --git a/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx b/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx index ba5145719..9d79a7019 100644 --- a/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx +++ b/packages/taler-wallet-webextension/src/mui/input/InputStandard.tsx @@ -1,8 +1,9 @@ import { css } from "@linaria/core"; import { h, VNode } from "preact"; +// eslint-disable-next-line import/extensions import { Colors, theme } from "../style"; -import { useFormControl } from "./FormControl"; -import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase"; +import { useFormControl } from "./FormControl.js"; +import { InputBase, InputBaseComponent, InputBaseRoot } from "./InputBase.js"; export interface Props { autoComplete?: string; |