chore: prettier

This commit is contained in:
Zamitto
2025-10-29 15:27:36 -03:00
parent d59ff5c484
commit 49df40650c

View File

@@ -4,10 +4,11 @@ import { useTranslation } from "react-i18next";
import cn from "classnames"; import cn from "classnames";
import "./text-field.scss"; import "./text-field.scss";
export interface TextFieldProps extends React.DetailedHTMLProps< export interface TextFieldProps
React.InputHTMLAttributes<HTMLInputElement>, extends React.DetailedHTMLProps<
HTMLInputElement React.InputHTMLAttributes<HTMLInputElement>,
> { HTMLInputElement
> {
theme?: "primary" | "dark"; theme?: "primary" | "dark";
label?: string | React.ReactNode; label?: string | React.ReactNode;
hint?: string | React.ReactNode; hint?: string | React.ReactNode;
@@ -42,7 +43,10 @@ export const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
const [isPasswordVisible, setIsPasswordVisible] = useState(false); const [isPasswordVisible, setIsPasswordVisible] = useState(false);
const { t } = useTranslation("forms"); const { t } = useTranslation("forms");
const showPasswordToggleButton = props.type === "password"; 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 ? ( const hintContent = error ? (
<small className="text-field-container__error-label">{error}</small> <small className="text-field-container__error-label">{error}</small>
) : hint ? ( ) : hint ? (
@@ -106,4 +110,4 @@ export const TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(
); );
} }
); );
TextField.displayName = "TextField"; TextField.displayName = "TextField";