Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

[FE] refactor: 카카오 로그인 버튼 svg 파일 대신 직접 디자인 #538

Merged
merged 2 commits into from
Oct 5, 2023
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 frontend/src/assets/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export { ReactComponent as PencilIcon } from './pencil.svg';
export { ReactComponent as WritingIcon } from './writing.svg';
export { ReactComponent as ImportIcon } from './import.svg';
export { ReactComponent as PlusIcon } from './plus.svg';
export { ReactComponent as KakaoLoginIcon } from './kakao-login.svg';
export { ReactComponent as KakaoSymbol } from './kakao-symbol.svg';
export { ReactComponent as DefaultUserProfileIcon } from './default-user-profile.svg';
export { ReactComponent as NotionIcon } from './notion.svg';
export { ReactComponent as DonggleIcon } from './donggle-logo.svg';
Expand Down
1 change: 0 additions & 1 deletion frontend/src/assets/icons/kakao-login.svg

This file was deleted.

2 changes: 2 additions & 0 deletions frontend/src/assets/icons/kakao-symbol.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 29 additions & 4 deletions frontend/src/components/Login/KakaoLoginButton.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
import { KakaoLoginIcon } from 'assets/icons';
import { KakaoSymbol } from 'assets/icons';
import { OauthPlatforms, getOauthPlatformURL } from 'constants/components/oauth';
import { styled } from 'styled-components';

const KakaoLoginButton = () => {
const redirectToKakao = () => {
window.location.href = getOauthPlatformURL(OauthPlatforms.kakao);
};

return (
<button onClick={redirectToKakao} aria-label='카카오 로그인 화면으로 이동'>
<KakaoLoginIcon aria-label='카카오 로그인 아이콘' />
</button>
<S.KakaoLoginButton onClick={redirectToKakao} aria-label='카카오 로그인 화면으로 이동'>
<KakaoSymbol width='18px' height='18px' />
<S.KakaoLoginText>카카오로 시작하기</S.KakaoLoginText>
</S.KakaoLoginButton>
);
};

export default KakaoLoginButton;

const S = {
KakaoLoginButton: styled.button`
display: flex;
width: 300px;
height: 45px;
justify-content: center;
align-items: center;
padding: 12px;
background-color: #fee500;
border-radius: 6px;
font-size: 1.4rem;
font-weight: 600;

&:hover {
background-color: #ffe000;
}
`,

KakaoLoginText: styled.span`
flex: 1;
`,
};
Loading