Skip to content

Commit

Permalink
📝 유효성 검사를 통한 버튼의 비활성화 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
jangmoonwon committed Jul 18, 2024
1 parent dfb693a commit c1305fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/auth/SignUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ export default function SignUp() {
)}
/>
</div>
<Button type='submit' className='w-full lg:max-w-[640px] md:max-w-[384px] lg:h-16 h-11 bg-black-500 font-pretendard text-white lg:text-xl md:text-base rounded-xl'>
<Button
disabled={!form.formState.isValid}
type='submit'
className={`w-full lg:max-w-[640px] md:max-w-[384px] lg:h-16 h-11 bg-black-500 font-pretendard text-white lg:text-xl md:text-base rounded-xl ${!form.formState.isValid ? 'bg-blue-300' : 'bg-black-500'}`}
>
가입하기
</Button>
</form>
Expand Down

0 comments on commit c1305fc

Please sign in to comment.