From e7ac79049d0f32e622527dc8efd644f4de02042e Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Thu, 2 Apr 2026 12:46:15 +0300 Subject: [PATCH] chore: rewrite LoginForm to use defaults from separate files --- src/features/auth/ui/LoginForm/LoginForm.tsx | 39 ++++++-------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/src/features/auth/ui/LoginForm/LoginForm.tsx b/src/features/auth/ui/LoginForm/LoginForm.tsx index bfe4e7f..5cc57e4 100644 --- a/src/features/auth/ui/LoginForm/LoginForm.tsx +++ b/src/features/auth/ui/LoginForm/LoginForm.tsx @@ -8,38 +8,23 @@ import { import { type SubmitEvent, type ChangeEvent, - type HTMLAttributes, - type InputHTMLAttributes, - type ButtonHTMLAttributes, cloneElement, type ReactElement, } from "react"; - -export type InputAttributes = InputHTMLAttributes; -export type ButtonAttributes = ButtonHTMLAttributes; +import { + DefaultButtonComponent, + type ButtonAttributes, +} from "../DefaultButton/DefaultButton"; +import { + DefaultInputComponent, + type InputAttributes, +} from "../DefaultInput/DefaultInput"; export interface Props { InputComponent?: ReactElement; ButtonComponent?: ReactElement; } -const DefaultInputComponent = ({ - value, - onChange, - ["aria-label"]: ariaLabel, -}: InputAttributes) => ( - -); - -const DefaultButtonComponent = ({ disabled }: ButtonAttributes) => ( -