diff --git a/src/renderer/src/components/text-field/text-field.tsx b/src/renderer/src/components/text-field/text-field.tsx index 7c0cbb58..76759126 100644 --- a/src/renderer/src/components/text-field/text-field.tsx +++ b/src/renderer/src/components/text-field/text-field.tsx @@ -4,10 +4,11 @@ import { useTranslation } from "react-i18next"; import cn from "classnames"; import "./text-field.scss"; -export interface TextFieldProps extends React.DetailedHTMLProps< - React.InputHTMLAttributes, - HTMLInputElement -> { +export interface TextFieldProps + extends React.DetailedHTMLProps< + React.InputHTMLAttributes, + HTMLInputElement + > { theme?: "primary" | "dark"; label?: string | React.ReactNode; hint?: string | React.ReactNode; @@ -42,7 +43,10 @@ export const TextField = React.forwardRef( const [isPasswordVisible, setIsPasswordVisible] = useState(false); const { t } = useTranslation("forms"); const showPasswordToggleButton = props.type === "password"; - const inputType = props.type === "password" && isPasswordVisible ? "text" : props.type ?? "text"; + const inputType = + props.type === "password" && isPasswordVisible + ? "text" + : (props.type ?? "text"); const hintContent = error ? ( {error} ) : hint ? ( @@ -106,4 +110,4 @@ export const TextField = React.forwardRef( ); } ); -TextField.displayName = "TextField"; \ No newline at end of file +TextField.displayName = "TextField";