Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: GeneralRegister input, button padding, 상단 문구 크기 조절 #319

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
return (
<input
type={type}
className={cn(InputVariants({ variant: isInvalid ? 'error' : 'default' }), className)}
className={cn(className, InputVariants({ variant: isInvalid ? 'error' : 'default' }))}
ref={ref}
disabled={isDisabled}
{...props}
Expand Down
14 changes: 8 additions & 6 deletions src/pages/general/containers/GeneralRegisterSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,16 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
return (
<div className="flex min-h-screen items-center justify-center">
<div className="flex w-full max-w-md flex-col items-center justify-center p-4">
<div className="pb-4 text-2xl font-bold not-italic leading-[normal] text-[rgb(0,0,0)]">{subSection1}</div>
<div className="pb-8 text-[1.4rem] font-bold not-italic leading-[normal] text-[rgb(0,0,0)] xs:text-[1.25rem]">
{subSection1}
</div>
<form noValidate onSubmit={handleSubmit(onSubmit)}>
{isScouncilPath ? (
<>
<Input
type="text"
placeholder="아이디"
className="w-[420px] xs:w-[250px] sm:w-[250px]"
className="w-[420px] xs:min-h-[36px] xs:w-[250px] xs:rounded-xs xs:px-[1rem] xs:py-0 sm:w-[250px] sm:px-[1rem] sm:py-[0.1rem]"
{...register('accountId', {
required: '아이디는 필수 입력입니다.',
})}
Expand All @@ -180,7 +182,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
<Input
type="password"
placeholder="비밀번호"
className="mt-4 xs:w-[250px] sm:w-[250px]"
className="mt-4 xs:min-h-[36px] xs:w-[250px] xs:rounded-xs xs:px-[1rem] xs:py-0 sm:w-[250px] sm:px-[1rem] sm:py-[0.1rem]"
{...register('password', {
required: '비밀번호는 필수 입력입니다.',
})}
Expand All @@ -199,7 +201,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
<Input
type="text"
placeholder="이름"
className="w-[420px] xs:w-[250px] sm:w-[250px]"
className="w-[420px] xs:min-h-[36px] xs:w-[250px] xs:rounded-xs xs:px-[1rem] xs:py-0 sm:w-[250px] sm:px-[1rem] sm:py-[0.1rem]"
{...register('name', {
required: '이름은 필수 입력입니다.',
})}
Expand All @@ -215,7 +217,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
<Input
type="text"
placeholder="학번"
className="mt-4 xs:w-[250px] sm:w-[250px]"
className="mt-4 xs:min-h-[36px] xs:w-[250px] xs:rounded-xs xs:px-[1rem] xs:py-0 sm:w-[250px] sm:px-[1rem] sm:py-[0.1rem]"
{...register('studentId', {
required: '학번은 필수 입력입니다.',
})}
Expand Down Expand Up @@ -296,7 +298,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
disabled={isSubmitting || isButtonDisabled}
variant="default"
size="default"
className={`mt-4 w-[420px] xs:w-[250px] sm:w-[250px] ${isSubmitting || isButtonDisabled ? 'bg-gray-400' : ''}`}
className={`mt-4 w-[420px] xs:min-h-[36px] xs:w-[250px] xs:rounded-xs xs:px-[1rem] xs:py-0 sm:w-[250px] sm:px-[1rem] sm:py-[0.1rem] ${isSubmitting || isButtonDisabled ? 'bg-gray-400' : ''}`}
>
{buttonSection}
</Button>
Expand Down