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 길이 조절 #317

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/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, isDisabled = false, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'button';
return (
<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} disabled={isDisabled} {...props} />
<Comp className={cn(buttonVariants({ className, variant, size }))} ref={ref} disabled={isDisabled} {...props} />
);
}
);
Expand Down
12 changes: 6 additions & 6 deletions src/pages/general/containers/GeneralRegisterSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ 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 p-4">
<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>
<form noValidate onSubmit={handleSubmit(onSubmit)}>
{isScouncilPath ? (
<>
<Input
type="text"
placeholder="아이디"
className="w-[420px]"
className="w-[420px] xs:w-[250px] sm:w-[250px]"
{...register('accountId', {
required: '아이디는 필수 입력입니다.',
})}
Expand All @@ -180,7 +180,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
<Input
type="password"
placeholder="비밀번호"
className="mt-4"
className="mt-4 xs:w-[250px] sm:w-[250px]"
{...register('password', {
required: '비밀번호는 필수 입력입니다.',
})}
Expand All @@ -199,7 +199,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
<Input
type="text"
placeholder="이름"
className="w-[420px]"
className="w-[420px] xs:w-[250px] sm:w-[250px]"
{...register('name', {
required: '이름은 필수 입력입니다.',
})}
Expand All @@ -215,7 +215,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
<Input
type="text"
placeholder="학번"
className="mt-4"
className="mt-4 xs:w-[250px] sm:w-[250px]"
{...register('studentId', {
required: '학번은 필수 입력입니다.',
})}
Expand Down Expand Up @@ -296,7 +296,7 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm
disabled={isSubmitting || isButtonDisabled}
variant="default"
size="default"
className={`mt-4 w-[420px] ${isSubmitting || isButtonDisabled ? 'bg-gray-400' : ''}`}
className={`mt-4 w-[420px] xs:w-[250px] sm:w-[250px] ${isSubmitting || isButtonDisabled ? 'bg-gray-400' : ''}`}
>
{buttonSection}
</Button>
Expand Down