-
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.
- Loading branch information
Showing
37 changed files
with
796 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
NEXT_PUBLIC_API_MOCKING=enabled # or disabled | ||
NEXT_PUBLIC_API_MOCKING=enabled # or disabled | ||
CHROMATIC_TOKEN=your-token |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
import React from 'react' | ||
import { FunctionComponent } from 'react' | ||
import LoginForm from '@/components/domain/LoginForm' | ||
|
||
export default function LoginPage() { | ||
return <div>LoginPage</div> | ||
interface LoginPageProps {} | ||
|
||
const LoginPage: FunctionComponent<LoginPageProps> = ({}) => { | ||
return ( | ||
<div className="h-screen"> | ||
<section className="flex items-center justify-center h-full "> | ||
<LoginForm /> | ||
</section> | ||
</div> | ||
) | ||
} | ||
|
||
export default LoginPage |
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 |
---|---|---|
@@ -1,14 +1,10 @@ | ||
import Link from 'next/link' | ||
import Button from '@/components/ui/Button' | ||
import { DarkModeButton } from '@/components/ui/DarkModeButton' | ||
|
||
export default function HomePage() { | ||
return ( | ||
<main className="flex flex-col items-center justify-between min-h-screen p-24 text-4xl font-bold text-text-color bg-background-color"> | ||
hi | ||
<DarkModeButton /> | ||
<Link href={'/login'}>로긴</Link> | ||
<Button variant={'gradation'}>버튼</Button> | ||
</main> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,5 +1,30 @@ | ||
import React from 'react' | ||
'use client' | ||
|
||
export default function LoginModalPage() { | ||
return <div className="bg-slate-400">LoginModalPage</div> | ||
import { FunctionComponent } from 'react' | ||
import { useRouter } from 'next/navigation' | ||
import LoginForm from '@/components/domain/LoginForm' | ||
import { Dialog, DialogContent } from '@/components/ui/Dialog' | ||
|
||
interface LoginModalPageProps {} | ||
|
||
const LoginModalPage: FunctionComponent<LoginModalPageProps> = () => { | ||
const router = useRouter() | ||
return ( | ||
<Dialog | ||
open={true} | ||
onOpenChange={(open) => { | ||
if (!open) { | ||
router.back() | ||
} | ||
}} | ||
> | ||
<DialogContent className="sm:max-w-[425px]"> | ||
<section className="py-4 my-20"> | ||
<LoginForm /> | ||
</section> | ||
</DialogContent> | ||
</Dialog> | ||
) | ||
} | ||
|
||
export default LoginModalPage |
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,16 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import LoginForm from './LoginForm' | ||
|
||
const meta = { | ||
title: 'DOMAIN/LoginForm', | ||
component: LoginForm, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
} satisfies Meta<typeof LoginForm> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Normal: Story = { | ||
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,14 @@ | ||
import Image from 'next/image' | ||
import Assets from '@/config/assets' | ||
import LoginButtons from './section/LoginButtons' | ||
|
||
const LoginForm = () => { | ||
return ( | ||
<section className="flex flex-col items-center justify-center w-full h-full gap-4"> | ||
<Image className="mb-20" src={Assets.logo} alt="nabi-logo" /> | ||
<LoginButtons /> | ||
</section> | ||
) | ||
} | ||
|
||
export default LoginForm |
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 LoginForm from './LoginForm' | ||
|
||
export default LoginForm |
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 @@ | ||
'use client' | ||
|
||
import React from 'react' | ||
import { KakaoLoginButton, GoogleLoginButton } from '../../buttons/LoginButtons' | ||
|
||
const LoginButtons = () => { | ||
return ( | ||
<section className="flex flex-col gap-2"> | ||
<KakaoLoginButton onClickButton={() => alert('k')} /> | ||
<GoogleLoginButton onClickButton={() => alert('g')} /> | ||
</section> | ||
) | ||
} | ||
|
||
export default LoginButtons |
30 changes: 30 additions & 0 deletions
30
src/components/domain/buttons/LoginButtons/LoginButtons.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,30 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { KakaoLoginButton, GoogleLoginButton } from './LoginButtons' | ||
|
||
const meta = { | ||
title: 'DOMAIN/LoginButtons', | ||
component: KakaoLoginButton, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
} satisfies Meta<typeof KakaoLoginButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Normal: Story = { | ||
args: {}, | ||
render: () => ( | ||
<section className="flex flex-col gap-3"> | ||
<KakaoLoginButton onClickButton={() => alert('카카오 버튼')} /> | ||
<GoogleLoginButton onClickButton={() => alert('구글 버튼')} /> | ||
</section> | ||
), | ||
} | ||
|
||
export const Kakao: Story = { | ||
render: () => <KakaoLoginButton onClickButton={() => alert('카카오 버튼')} />, | ||
} | ||
|
||
export const Google: Story = { | ||
render: () => <GoogleLoginButton onClickButton={() => alert('구글 버튼')} />, | ||
} |
42 changes: 42 additions & 0 deletions
42
src/components/domain/buttons/LoginButtons/LoginButtons.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,42 @@ | ||
import React from 'react' | ||
import Image from 'next/image' | ||
import Button from '@/components/ui/Button' | ||
import Assets from '@/config/assets' | ||
|
||
const KakaoLoginButton = ({ onClickButton }: { onClickButton: () => void }) => { | ||
return ( | ||
<Button | ||
onClick={onClickButton} | ||
className="relative h-10 text-black transition-all bg-kakao-color hover:brightness-90 w-80 hover:bg-kakao-color" | ||
> | ||
<Image | ||
className="absolute flex-shrink-0 left-3" | ||
src={Assets.kakaoIcon} | ||
alt="카카오 로그인" | ||
/> | ||
카카오 계정으로 시작하기 | ||
</Button> | ||
) | ||
} | ||
|
||
const GoogleLoginButton = ({ | ||
onClickButton, | ||
}: { | ||
onClickButton: () => void | ||
}) => { | ||
return ( | ||
<Button | ||
onClick={onClickButton} | ||
className="relative h-10 text-black transition-all bg-white border border-gray hover:brightness-90 w-80 hover:bg-white" | ||
> | ||
<Image | ||
className="absolute flex-shrink-0 left-3" | ||
src={Assets.googleIcon} | ||
alt="구글 로그인" | ||
/> | ||
구글 계정으로 시작하기 | ||
</Button> | ||
) | ||
} | ||
|
||
export { KakaoLoginButton, GoogleLoginButton } |
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 { KakaoLoginButton, GoogleLoginButton } from './LoginButtons' | ||
|
||
export { KakaoLoginButton, GoogleLoginButton } |
Oops, something went wrong.