-
Notifications
You must be signed in to change notification settings - Fork 6
Feat : 링크 생성 시 폴더 선택 모달창 수정 #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bf3fc20
Chore: AddModal prop 추가
hongggyelim b0bd79b
Refactor: 모달 컨테이너 제출 버튼 삭제 - children에 버튼 추가
hongggyelim b848171
Chore: 모달 기본값 수정
hongggyelim f763dcf
Feat: 폴더 택1 기능 추가
hongggyelim cbad263
Remove: FolderItem 파일 삭제
hongggyelim 299af89
Chore: 불필요한 공백 삭제
hongggyelim c397aa9
Feat : AddModal에서 링크 생성 기능 - 테스트 필요
hongggyelim 2cb71c6
Chore: 폴더아이템 타입 오타 수정, 모달 호출 시 테스트 prop 추가
hongggyelim 05243cd
Feat: 링크 추가 성공
hongggyelim 2402bc0
Chore: 콘솔 출력 제거
hongggyelim c705c77
Chore: 콘솔 출력 제거
hongggyelim d2d072a
Merge branch 'feature/modalAction' of https://github.com/codeit9-temp…
hongggyelim 327873c
Feat : 모달 닫힘 추가
hongggyelim 6087795
Fix: 타입 에러 수정
hongggyelim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,13 +1,20 @@ | ||
| import SubmitButton from "../SubMitButton"; | ||
| import ModalContainer from "./modalComponents/ModalContainer"; | ||
|
|
||
| const DeleteFolderModal = ({ folderName }: { folderName: string }) => { | ||
| console.log("folderName", folderName); | ||
| return ( | ||
| <ModalContainer | ||
| title="폴더 삭제" | ||
| subtitle={folderName} | ||
| buttonText="삭제하기" | ||
| buttonColor="negative" | ||
| ></ModalContainer> | ||
| <ModalContainer title="폴더 삭제" subtitle={folderName}> | ||
| <SubmitButton | ||
| type="button" | ||
| // onClick={handleSubmit} | ||
| width="w-full" | ||
| height="h-[51px] " | ||
| color="negative" | ||
| > | ||
| 삭제하기 | ||
| </SubmitButton> | ||
| </ModalContainer> | ||
| ); | ||
| }; | ||
| export default DeleteFolderModal; |
This file contains hidden or 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,13 +1,19 @@ | ||
| import SubmitButton from "../SubMitButton"; | ||
| import ModalContainer from "./modalComponents/ModalContainer"; | ||
|
|
||
| const DeleteLinkModal = ({ link }: { link: string }) => { | ||
| return ( | ||
| <ModalContainer | ||
| title="링크 삭제" | ||
| subtitle={link} | ||
| buttonText="삭제하기" | ||
| buttonColor="negative" | ||
| ></ModalContainer> | ||
| <ModalContainer title="링크 삭제" subtitle={link}> | ||
| <SubmitButton | ||
| type="button" | ||
| // onClick={handleSubmit} | ||
| width="w-full" | ||
| height="h-[51px] " | ||
| color="negative" | ||
| > | ||
| 삭제하기 | ||
| </SubmitButton> | ||
| </ModalContainer> | ||
| ); | ||
| }; | ||
| export default DeleteLinkModal; |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,47 @@ | ||
| import { bindCls } from "@/lib/utils"; | ||
| import { FolderItemType } from "@/types/modalTypes"; | ||
| import { FaCheck } from "react-icons/fa6"; | ||
|
|
||
| const FolderItemRadio = ({ | ||
| item, | ||
| selectedId, | ||
| onClick, | ||
| }: { | ||
| item: FolderItemType; | ||
| selectedId: number | null; | ||
| onClick: (id: number) => void; | ||
| }) => { | ||
| const { name, linkCount, id } = item; | ||
| let isSelected = id === selectedId; | ||
| const bgColor = isSelected ? "bg-gray100" : "bg-white"; | ||
|
|
||
| const onClickFolderItem = () => { | ||
| onClick(id); | ||
| }; | ||
| return ( | ||
| <li | ||
| className={bindCls( | ||
| bgColor, | ||
| "w-full p-2 flex h-10 rounded-lg items-center justify-between cursor-pointer" | ||
| )} | ||
| onClick={onClickFolderItem} | ||
| > | ||
| <div className="flex justify-start items-center p-2"> | ||
| <label htmlFor={String(id)}>{name}</label> | ||
| <input | ||
| value={name} | ||
| type="radio" | ||
| className="opacity-0" | ||
| id={String(id)} | ||
| /> | ||
| <div className="text-gray400 text-sm">{linkCount}개 링크</div> | ||
| </div> | ||
| {isSelected && ( | ||
| <div> | ||
| <FaCheck className="text-purple100" /> | ||
| </div> | ||
| )} | ||
| </li> | ||
| ); | ||
| }; | ||
| export default FolderItemRadio; | ||
This file contains hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
변수명은 줄이지 않고 FaviconCheck 라고 하는게 전 더 직관적인 것 같아요~
다른 애들도 안 줄였으니 통일성도 좋고요!
위에도 마찬가지로 bindClass 이런식으로요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FaCheck 은 react-icon에서 지원하는 svg 컴포넌트 입니다!
cls 는 다음번에 참고하겠습니다