-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
328eaa9
commit ce7bd0d
Showing
11 changed files
with
357 additions
and
53 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
33 changes: 33 additions & 0 deletions
33
src/components/organisms/modal/auth/AuthCheckingModalContent.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,33 @@ | ||
import React from "react"; | ||
|
||
interface authCheckingModalProps { | ||
name: string; | ||
major: string; | ||
studentId: string; | ||
} | ||
|
||
const AuthCheckingModal = ({ | ||
name, | ||
major, | ||
studentId, | ||
}: authCheckingModalProps) => { | ||
return ( | ||
<div className="flex flex-col justify-center"> | ||
<h1 className="medium-medium text-gray-dark-text-1 mb-24"> | ||
올바른 정보가 맞는지 확인해 주세요. | ||
</h1> | ||
<h1 className="medium-regular text-gray-dark-text-1">이름: {name}</h1> | ||
<h1 className="medium-regular text-gray-dark-text-1 mb-24"> | ||
학과/학번: {major} {studentId} | ||
</h1> | ||
<h2 className="small-regular text-gray-medium-text-2 "> | ||
* 정보가 다르다면 관리자에게 문의해 주세요. | ||
</h2> | ||
<h2 className="small-regular text-gray-medium-text-2 "> | ||
mjuletter@gmail.com | ||
</h2> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AuthCheckingModal; |
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,18 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import AuthModal from "./AuthModal"; | ||
|
||
const meta: Meta<typeof AuthModal> = { | ||
title: "components/organisms/modal/AuthModal", | ||
component: AuthModal, | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof AuthModal>; | ||
|
||
export const Primary: 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,69 @@ | ||
import ModalView from "@/components/molecules/modal/ModalView"; | ||
import { AuthModalProps } from "@/types/Modal"; | ||
import { useDisclosure } from "@nextui-org/react"; | ||
import React from "react"; | ||
import AuthCheckingModalContent from "./AuthCheckingModalContent"; | ||
|
||
const AuthModal = ({ authStatus }: AuthModalProps) => { | ||
const { isOpen, onOpen, onOpenChange } = useDisclosure(); | ||
const handleYesClick = () => { | ||
console.log("Yes button clicked!"); | ||
}; | ||
const handleNoClick = () => { | ||
console.log("No button clicked!"); | ||
}; | ||
|
||
return ( | ||
<> | ||
{authStatus === "proceeding" && ( | ||
<ModalView | ||
isOpen={isOpen} | ||
onOpen={onOpen} | ||
onOpenChange={onOpenChange} | ||
children={`학생카드 인증 중 \n 조금만 기다려 주세요.`} | ||
/> | ||
// <ModalView> | ||
// <ModalContent info={`학생카드 인증 중 \n 조금만 기다려 주세요.`} /> | ||
// </ModalView> | ||
)} | ||
{authStatus === "checking" && ( | ||
<ModalView | ||
isOpen={isOpen} | ||
onOpen={onOpen} | ||
onOpenChange={onOpenChange} | ||
children={ | ||
<AuthCheckingModalContent name={""} major={""} studentId={""} /> | ||
} | ||
yesBtn={{ info: "확인", handler: handleYesClick }} | ||
noBtn={{ info: "취소", handler: handleNoClick }} | ||
/> | ||
// <ModalView> | ||
// <ModalContent | ||
// info={ | ||
// <AuthCheckingModalContent name={""} major={""} studentId={""} /> | ||
// } | ||
// yesBtn={{ info: "확인", handler: handleYesClick }} | ||
// noBtn={{ info: "취소", handler: handleNoClick }} | ||
// /> | ||
// </ModalView> | ||
)} | ||
{authStatus === "failed" && ( | ||
<ModalView | ||
isOpen={isOpen} | ||
onOpen={onOpen} | ||
onOpenChange={onOpenChange} | ||
children={`학생카드 인증에 실패했어요.\n 다시 시도해 주세요.`} | ||
yesBtn={{ info: "확인", handler: handleYesClick }} | ||
/> | ||
// <ModalView> | ||
// <ModalContent | ||
// info={`학생카드 인증에 실패했어요.\n 다시 시도해 주세요.`} | ||
// yesBtn={{ info: "확인", handler: handleYesClick }} | ||
// /> | ||
// </ModalView> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default AuthModal; |
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 { StaticImageData } from "next/image"; | ||
import React from "react"; | ||
|
||
interface DetailModalProps { | ||
letterText: string; | ||
user?: { name: string; profileImg: StaticImageData | string }; | ||
backgroundColor: string; | ||
isMine: boolean; | ||
} | ||
|
||
const DetailModal = () => { | ||
return <div>DetailModal</div>; | ||
}; | ||
|
||
export default DetailModal; |
16 changes: 16 additions & 0 deletions
16
src/components/organisms/modal/letter/WriteModal.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,16 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import WriteModal from "./WriteModal"; | ||
const meta: Meta<typeof WriteModal> = { | ||
title: "components/organisms/modal/WriteModal", | ||
component: WriteModal, | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof WriteModal>; | ||
|
||
export const Primary: 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,24 @@ | ||
import ModalView from "@/components/molecules/modal/ModalView"; | ||
import { COLORS } from "@/constants/letterColors"; | ||
import React, { useState } from "react"; | ||
import LetterModalContent from "./WriteModalContent"; | ||
|
||
const WriteModal = () => { | ||
const [selectedColor, setSelectedColor] = | ||
useState<keyof typeof COLORS>("red"); | ||
const [isChecked, setIsChecked] = useState(false); | ||
const [textAreaValue, setTextAreaValue] = useState(""); | ||
|
||
return ( | ||
<LetterModalContent | ||
selectedColor={selectedColor} | ||
setSelectedColor={setSelectedColor} | ||
textAreaValue={textAreaValue} | ||
setTextAreaValue={setTextAreaValue} | ||
isChecked={isChecked} | ||
setIsChecked={setIsChecked} | ||
/> | ||
); | ||
}; | ||
|
||
export default WriteModal; |
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.