Skip to content

Commit ecd0549

Browse files
committed
feat : 외부 링크 추가 모달 임시 작성
- 외부 링크를 추가할 수 있는 모달을 임시 작성 - 실제 api 연결 시, 해당 모달의 기능을 상세로 추가할 예정
1 parent 51d705f commit ecd0549

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

frontend/src/components/landing/LandingLinkModal.tsx

+35-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
1+
import { MouseEventHandler } from "react";
2+
13
const LandingLinkModal = ({ close }: { close: () => void }) => {
4+
const handleCloseClick: MouseEventHandler<
5+
HTMLButtonElement | HTMLDivElement
6+
> = ({ target, currentTarget }: React.MouseEvent) => {
7+
if (target !== currentTarget) return;
8+
close();
9+
};
10+
211
return (
3-
<div className="w-full h-full bg-black-30 flex justify-center items-center">
4-
<div className="w-[40.625rem]">hello world</div>
12+
<div
13+
className="top-0 left-0 absolute w-screen h-screen flex justify-center items-center bg-black bg-opacity-30"
14+
onClick={handleCloseClick}
15+
>
16+
<div className="w-[40.625rem] bg-white flex flex-col p-9 gap-9 rounded-lg shadow-box">
17+
<p className="text-m font-bold">| 링크 추가하기</p>
18+
<div className="flex gap-8 items-center">
19+
<p className="text-xs shrink-0">링크 주소</p>
20+
<input className="rounded-lg w-full border border-text-gray text-xs py-1 px-2" />
21+
</div>
22+
<div className="flex gap-8 items-center">
23+
<p className="text-xs shrink-0">링크 이름</p>
24+
<input className="rounded-lg w-full border border-text-gray text-xs py-1 px-2" />
25+
</div>
26+
<div className="flex gap-3 justify-end">
27+
<button className="rounded-lg bg-middle-green text-white text-xs px-3 py-1 hover:bg-dark-green">
28+
완료
29+
</button>
30+
<button
31+
className="rounded-lg border border-light-gray text-xs px-3 py-1 hover:bg-light-gray"
32+
onClick={handleCloseClick}
33+
>
34+
취소
35+
</button>
36+
</div>
37+
</div>
538
</div>
639
);
740
};

0 commit comments

Comments
 (0)