-
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.
Merge branch 'develop' into design/#252_page-ui
- Loading branch information
Showing
12 changed files
with
185 additions
and
87 deletions.
There are no files selected for viewing
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
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
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,22 @@ | ||
import { action } from '@storybook/addon-actions/*' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { LoginModal as LoginModalComponent } from './index' | ||
|
||
type LoginModal = typeof LoginModalComponent | ||
|
||
const meta: Meta<LoginModal> = { | ||
component: LoginModalComponent, | ||
title: 'Common/LoginModal' | ||
} | ||
|
||
export default meta | ||
|
||
export const Default: StoryObj<LoginModal> = { | ||
parameters: { | ||
isOpen: true, | ||
onClose: () => { | ||
action('onChangeTradeStatus')('click') | ||
} | ||
}, | ||
render: args => <LoginModalComponent {...args} /> | ||
} |
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,32 @@ | ||
import { useRouter } from 'next/router' | ||
import { Styled } from './styled' | ||
import type { LoginModalProps } from './types' | ||
import { CommonModal } from '../CommonModal' | ||
import { OAUTH_URL } from '@constants' | ||
|
||
export const LoginModal = ({ isOpen, onClose }: LoginModalProps) => { | ||
const router = useRouter() | ||
|
||
const handleClickLogin = () => { | ||
router.replace(OAUTH_URL.KAKAO) | ||
} | ||
|
||
return ( | ||
<CommonModal | ||
buttons={[ | ||
<Styled.KaKaoButton | ||
key="kakao-button" | ||
color="kakao" | ||
icon="kakao" | ||
size="large" | ||
onClick={handleClickLogin}> | ||
카카오로 시작하기 | ||
</Styled.KaKaoButton> | ||
]} | ||
hasLogo | ||
isOpen={isOpen} | ||
title={`가격을 제안해보세요\n경매식 중고거래, Offer!`} | ||
onClose={onClose} | ||
/> | ||
) | ||
} |
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,15 @@ | ||
import { css } from '@emotion/react' | ||
import styled from '@emotion/styled' | ||
import { Button } from '@offer-ui/react' | ||
|
||
const KaKaoButton = styled(Button)` | ||
${({ theme }) => css` | ||
background: ${theme.colors.kakao}; | ||
color: ${theme.colors.grayScale90}; | ||
`}; | ||
` | ||
|
||
export const Styled = { | ||
KaKaoButton | ||
} |
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,4 @@ | ||
export type LoginModalProps = { | ||
isOpen?: boolean | ||
onClose(): void | ||
} |
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
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
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
Oops, something went wrong.