-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 테스트 로그인 버튼 컴포넌트 구현 및 로그인 페이지에 추가 (#287)
* refactor: TestSignInButton 컴포넌트 * refactor: 로그인 페이지에 테스트 버튼 추가 * refactor: 카카오 로그인 비활성화
- Loading branch information
Showing
4 changed files
with
121 additions
and
7 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
src/components/molecules/TestSignInButton/TestSignInButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { Box, Image, Text } from '@chakra-ui/react'; | ||
import { BorderBox } from '~/components/atoms/BorderBox'; | ||
import { assets } from '~/config/assets'; | ||
|
||
type TestSignInButtonProps = { | ||
logo: 'mentee' | 'mentor'; | ||
onClick: VoidFunction; | ||
}; | ||
|
||
const TestSignInButton = ({ logo, onClick }: TestSignInButtonProps) => { | ||
const LOGOS = { | ||
mentee: { | ||
svg: assets.menteeSvg, | ||
text: '멘티', | ||
}, | ||
mentor: { | ||
svg: assets.mentorSvg, | ||
text: '멘토', | ||
}, | ||
}; | ||
|
||
return ( | ||
<button onClick={onClick}> | ||
<BorderBox | ||
w={'5.8rem'} | ||
h={'8rem'} | ||
display={'flex'} | ||
flexDirection="column" | ||
gap={'0.7rem'} | ||
justifyContent={'center'} | ||
alignItems={'center'} | ||
position={'relative'} | ||
> | ||
<Box | ||
w={'auto'} | ||
h={'1.2rem'} | ||
zIndex={1} | ||
bgColor={'gray.900'} | ||
position="absolute" | ||
top={'0'} | ||
right={'-3'} | ||
borderLeftRadius={'0.2rem'} | ||
paddingLeft={'0.4rem'} | ||
paddingRight={'0.6rem'} | ||
> | ||
<Text | ||
fontWeight={'bold'} | ||
fontSize={'xs'} | ||
color={'lightgreen'} | ||
> | ||
TEST | ||
</Text> | ||
</Box> | ||
<Image | ||
src={LOGOS[logo].svg} | ||
alt={LOGOS[logo].text} | ||
/> | ||
<Box as="span">{LOGOS[logo].text}</Box> | ||
</BorderBox> | ||
</button> | ||
); | ||
}; | ||
|
||
export default TestSignInButton; |
28 changes: 28 additions & 0 deletions
28
src/components/molecules/TestSignInButton/index.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { Meta } from '@storybook/react'; | ||
import TestSignInButton from './TestSignInButton'; | ||
|
||
const meta = { | ||
title: 'Resumeme/Components/Molecules/TestSignInButton', | ||
component: TestSignInButton, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof TestSignInButton>; | ||
|
||
export default meta; | ||
|
||
export const MenteeSignInButton = () => { | ||
return ( | ||
<TestSignInButton | ||
logo="mentee" | ||
onClick={() => {}} | ||
/> | ||
); | ||
}; | ||
|
||
export const MentorSignInButton = () => { | ||
return ( | ||
<TestSignInButton | ||
logo="mentor" | ||
onClick={() => {}} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import TestSignInButton from './TestSignInButton'; | ||
|
||
export { TestSignInButton }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters