-
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
Changes from 2 commits
bf3fc20
b0bd79b
b848171
f763dcf
cbad263
299af89
c397aa9
2cb71c6
05243cd
2402bc0
c705c77
d2d072a
327873c
6087795
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,19 @@ | ||
| import SubmitButton from "../SubMitButton"; | ||
| import ModalContainer from "./modalComponents/ModalContainer"; | ||
|
|
||
| const DeleteFolderModal = ({ folderName }: { folderName: string }) => { | ||
| 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; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,20 @@ | ||
| 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; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 상태관리를 용이하게 하기위해 버튼 컴포넌트를 ModalContainer에서 분리했습니다 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { bindCls } from "@/lib/utils"; | ||
| import { FolderItemType } from "@/types/modalTypes"; | ||
| import { useState } from "react"; | ||
| import { FaCheck } from "react-icons/fa6"; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 변수명은 줄이지 않고 FaviconCheck 라고 하는게 전 더 직관적인 것 같아요~
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FaCheck 은 react-icon에서 지원하는 svg 컴포넌트 입니다! |
||
|
|
||
| const FolderItemRadio = ({ | ||
| item, | ||
| isSelected, | ||
| }: { | ||
| item: FolderItemType; | ||
| isSelected: boolean; | ||
| }) => { | ||
| // const bgColor = selected ? "bg-gray100" : "bg-white"; | ||
|
|
||
| const { name, linkCount, id } = item; | ||
|
|
||
| const onClickFolder = () => { | ||
| // setSelected(!selected); | ||
| }; | ||
| return ( | ||
| <li | ||
| className={bindCls( | ||
| // bgColor, | ||
| "w-full p-2 flex h-10 rounded-lg items-center justify-between cursor-pointer" | ||
| )} | ||
| onClick={onClickFolder} | ||
| > | ||
| <div className="flex items-center gap-2"> | ||
| <input | ||
| value={name} | ||
| type="radio" | ||
| className="opacity-0" | ||
| id={String(id)} | ||
| /> | ||
| <label htmlFor={String(id)}>{name}</label> | ||
| <div className="text-gray400 text-sm">{linkCount}개 링크</div> | ||
| </div> | ||
| {/* {selected && ( */} | ||
| <div> | ||
| <FaCheck className="text-purple100" /> | ||
| </div> | ||
| {/* )} */} | ||
| </li> | ||
| ); | ||
| }; | ||
| export default FolderItemRadio; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ModalContainer내부에 있던 버튼 컴포넌트를 children으로 받도록 하면서 버튼 관련 prop 제거했습니다 |
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 기본 값을 수정했습니다 (단순 참고용) |
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.
사소한거긴 한데 height="h-[51px] " 에 공백이 있습니당! tailwind css 는 공백이 있을 경우 안먹을 수도 있다네욧
Uh oh!
There was an error while loading. Please reload this page.
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.
오 감사합니다 수정해써요~!