Skip to content

Commit 2fc7d8d

Browse files
committed
feat: gallery 명함 게시 컴포넌트 추가, API 연결만 하면 됨.
1 parent 4579b25 commit 2fc7d8d

File tree

6 files changed

+424
-210
lines changed

6 files changed

+424
-210
lines changed

src/features/gallery/PublishMyCard.tsx

Lines changed: 0 additions & 199 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
import { css, type Theme } from '@emotion/react';
2+
3+
import BottomSheet from '~/components/bottomSheet/BottomSheet';
4+
import Button from '~/components/button/Button';
5+
import { XCircleButton } from '~/components/button/CircleButton';
6+
import BottomSheetHandleIcon from '~/components/icons/BottomSheetHandleIcon';
7+
import Card from '~/features/gallery/Card';
8+
import { type JobType } from '~/features/gallery/PublishMyCard/JobSelectModal';
9+
import { fixedBottomCss } from '~/features/survey/styles';
10+
import { DUMMY_GALLERY } from '~/hooks/api/gallery/useGetGalleryList';
11+
import useScrollLock from '~/hooks/common/useScrollLock';
12+
import { BODY_1, DETAIL, HEAD_1 } from '~/styles/typo';
13+
14+
interface Props {
15+
isShowing: boolean;
16+
onClose: () => void;
17+
18+
job: JobType;
19+
onSubmit: () => void;
20+
}
21+
22+
function CardPublishBottomSheet(props: Props) {
23+
useScrollLock({ lock: props.isShowing });
24+
25+
return (
26+
<BottomSheet isShowing={props.isShowing} onClickOutside={props.onClose}>
27+
<BottomSheetHandleIcon />
28+
<div css={innerCss}>
29+
<hgroup css={headingCss}>
30+
<h1>내 커리어 명함 게시하기</h1>
31+
<p>명함 갤러리에 게시 후 서로의 명함을 저장해보세요</p>
32+
</hgroup>
33+
<section>
34+
<div css={tagCss}>미리보기</div>
35+
<Card gallery={DUMMY_GALLERY} />
36+
</section>
37+
<article css={[fixedBottomCss, bottomCss]}>
38+
<XCircleButton onClick={props.onClose} />
39+
<Button css={submitButtonCss} onClick={props.onSubmit}>
40+
게시하기
41+
</Button>
42+
</article>
43+
</div>
44+
</BottomSheet>
45+
);
46+
}
47+
48+
export default CardPublishBottomSheet;
49+
50+
const innerCss = css`
51+
overflow-y: auto;
52+
min-height: fit-content;
53+
max-height: calc(100vh - 12px);
54+
padding: 47px 20px 94px;
55+
`;
56+
57+
const headingCss = (theme: Theme) => css`
58+
margin-bottom: 35px;
59+
text-align: center;
60+
61+
h1 {
62+
${HEAD_1};
63+
color: ${theme.colors.black};
64+
}
65+
66+
p {
67+
${BODY_1};
68+
margin-top: 4px;
69+
color: ${theme.colors.gray_500};
70+
}
71+
`;
72+
73+
const tagCss = (theme: Theme) => css`
74+
${DETAIL};
75+
width: fit-content;
76+
margin-bottom: 18px;
77+
margin-inline: auto;
78+
padding: 4px 10px;
79+
80+
color: ${theme.colors.gray_500};
81+
82+
background-color: ${theme.colors.gray_50};
83+
border-radius: 8px;
84+
`;
85+
86+
const bottomCss = css`
87+
display: flex;
88+
justify-content: space-between;
89+
`;
90+
91+
const submitButtonCss = css`
92+
width: 50%;
93+
`;

0 commit comments

Comments
 (0)