Skip to content

Commit

Permalink
๐ŸŽจ Style: ๋กœ๊ทธ์ธ ํŽ˜์ด์ง€ ์Šคํƒ€์ผ ์ปดํฌ๋„ŒํŠธ ๋ถ„๋ฆฌ (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-paik committed Jul 12, 2023
1 parent afd9632 commit e717034
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 40 deletions.
53 changes: 13 additions & 40 deletions src/pages/LoginPage/LoginPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState, useEffect } from 'react';
import styled, { css, keyframes } from 'styled-components';
import { useNavigate, Link } from 'react-router-dom';
import { useRecoilState } from 'recoil';

Expand All @@ -15,6 +14,14 @@ import {
} from '../../atoms/UserAtom';
import { loginAtom } from '../../atoms/LoginAtom';

import {
Container,
LoginTitle,
Form,
SignupLink,
ErrorMsg
} from './LoginPageStyle';

const LoginPage = () => {
const navigate = useNavigate();

Expand Down Expand Up @@ -88,9 +95,9 @@ const LoginPage = () => {
}, [userLogin]);

return (
<LoginContainer>
<Container>
<LoginTitle>๋กœ๊ทธ์ธ</LoginTitle>
<LoginForm onSubmit={handleLogin}>
<Form onSubmit={handleLogin}>
<div className="input-wrapper">
<Input
label="์ด๋ฉ”์ผ"
Expand Down Expand Up @@ -121,44 +128,10 @@ const LoginPage = () => {
text={'๋กœ๊ทธ์ธ'}
isDisabled={!handleActivateButton()}
/>
</LoginForm>
</Form>
<SignupLink to="/signup">์ด๋ฉ”์ผ๋กœ ํšŒ์›๊ฐ€์ž…</SignupLink>
</LoginContainer>
</Container>
);
};

export default LoginPage;

const LoginContainer = styled.section`
margin: 0 auto;
`;

const LoginTitle = styled.h1`
padding-top: 2.7rem;
color: ${({ theme }) => theme.colors.blackText};
font-size: ${({ theme }) => theme.fontSize.xxlarge};
text-align: center;
margin-bottom: 4.5rem;
`;

const LoginForm = styled.form`
.input-wrapper {
margin-bottom: 3rem;
}
`;

const SignupLink = styled(Link)`
text-align: center;
font-size: ${({ theme }) => theme.fontSize.small};
color: ${({ theme }) => theme.colors.textColor};
display: block;
padding-top: 1.9rem;
`;

const ErrorMsg = styled.p`
${({ theme }) => css`
color: ${theme.colors.errorText};
font-size: ${theme.fontSize.small};
margin-top: -0.9rem;
`}
`;
export default LoginPage;
36 changes: 36 additions & 0 deletions src/pages/LoginPage/LoginPageStyle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import styled, { css, keyframes } from 'styled-components';
import { Link } from 'react-router-dom';

export const Container = styled.main`
margin: 0 auto;
`;

export const LoginTitle = styled.h1`
padding-top: 2.7rem;
color: ${({ theme }) => theme.colors.blackText};
font-size: ${({ theme }) => theme.fontSize.xxlarge};
text-align: center;
margin-bottom: 4.5rem;
`;

export const Form = styled.form`
.input-wrapper {
margin-bottom: 3rem;
}
`;

export const SignupLink = styled(Link)`
text-align: center;
font-size: ${({ theme }) => theme.fontSize.small};
color: ${({ theme }) => theme.colors.textColor};
display: block;
padding-top: 1.9rem;
`;

export const ErrorMsg = styled.p`
${({ theme }) => css`
color: ${theme.colors.errorText};
font-size: ${theme.fontSize.small};
margin-top: -0.9rem;
`}
`;

0 comments on commit e717034

Please sign in to comment.