Skip to content

Commit e064a0f

Browse files
authored
Merge branch 'develop' into feat/benefit-component/#55
2 parents 8ba0a0e + b2de49d commit e064a0f

30 files changed

+1168
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"dependencies": {
2323
"@vanilla-extract/css": "^1.17.4",
2424
"@vanilla-extract/recipes": "^0.5.7",
25+
"ky": "^1.14.0",
2526
"react": "^19.2.0",
2627
"react-dom": "^19.2.0",
2728
"react-router": "^7.9.6"

pnpm-lock.yaml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/img/product_detail.jpg

77.5 KB
Loading

src/assets/img/product_detail.png

-201 KB
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { recipe } from "@vanilla-extract/recipes";
2+
3+
export const imageWrapper = recipe({
4+
base: {
5+
transition: "max-height 0.5s ease, opacity 0.5s ease",
6+
},
7+
variants: {
8+
isDetailOpen: {
9+
true: {
10+
padding: "0.8rem 0 1.6rem 0",
11+
maxHeight: "50rem",
12+
opacity: 1,
13+
},
14+
false: {
15+
maxHeight: 0,
16+
opacity: 0,
17+
overflow: "hidden",
18+
},
19+
},
20+
},
21+
defaultVariants: {
22+
isDetailOpen: false,
23+
},
24+
});
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import * as styles from "./detail-section.css";
2+
import { useState } from "react";
3+
import LargeButton from "@/shared/components/button/large-button/large-button";
4+
import { LARGE_BUTTON_VARIANTS } from "@/shared/constants/button";
5+
import ProductDetailImage from "@/assets/img/product_detail.jpg";
6+
7+
export const DetailSection = () => {
8+
const [isDetailOpen, setIsDetailOpen] = useState(false);
9+
10+
const largeButtonProps = {
11+
type: "button" as const,
12+
"aria-label": isDetailOpen ? "상세 정보 접기" : "상세 정보 더보기",
13+
hasArrow: true,
14+
variant: isDetailOpen
15+
? LARGE_BUTTON_VARIANTS.ACTIVE
16+
: LARGE_BUTTON_VARIANTS.DEFAULT,
17+
onClick: () => setIsDetailOpen(!isDetailOpen),
18+
};
19+
return (
20+
<>
21+
<div className={styles.imageWrapper({ isDetailOpen })}>
22+
<img src={ProductDetailImage} alt="작품 세부 이미지" />
23+
</div>
24+
25+
<LargeButton {...largeButtonProps}>
26+
{isDetailOpen ? "상세 정보 접기" : "상세 정보 더보기"}
27+
</LargeButton>
28+
</>
29+
);
30+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { color } from "@/shared/styles/tokens/color.css";
2+
import { typographyVars } from "@/shared/styles/typography.css";
3+
import { style } from "@vanilla-extract/css";
4+
5+
export const productInfo = style({
6+
display: "flex",
7+
flexDirection: "column",
8+
gap: "1.6rem",
9+
margin: "4rem 0 3.8rem 0",
10+
});
11+
12+
export const productInfoTitle = style({
13+
...typographyVars.heading3,
14+
color: color.black[100],
15+
cursor: "default",
16+
});
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { MakerAccordion } from "@/shared/components/accordian/maker-accordian";
2+
import * as styles from "./product-info-notice.css";
3+
4+
interface AccordionItem {
5+
id: string;
6+
title: string;
7+
selectedOption?: string;
8+
iconType?: "arrow" | "chevron";
9+
}
10+
11+
const mainInfoItems: AccordionItem[] = [
12+
{ id: "basic", title: "작품 기본 정보" },
13+
{
14+
id: "delivery",
15+
title: "제작 / 배송",
16+
selectedOption: "평균 1일 / 최대 1일 이내",
17+
},
18+
{ id: "refund", title: "교환 / 환불 / 반품" },
19+
];
20+
21+
const reportItem: AccordionItem = {
22+
id: "report",
23+
title: "작품 제보하기",
24+
iconType: "arrow",
25+
};
26+
27+
export const ProductInfoNotice = () => {
28+
return (
29+
<div className={styles.productInfo}>
30+
<h3 className={styles.productInfoTitle}>작품 정보 고시</h3>
31+
<div>
32+
{mainInfoItems.map((item) => (
33+
<MakerAccordion
34+
key={item.id}
35+
title={item.title}
36+
iconType={item.iconType}
37+
selectedOption={item.selectedOption}
38+
/>
39+
))}
40+
</div>
41+
<MakerAccordion
42+
key={reportItem.id}
43+
title={reportItem.title}
44+
iconType={reportItem.iconType}
45+
/>
46+
</div>
47+
);
48+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { color } from "@/shared/styles/tokens/color.css";
2+
import { typographyVars } from "@/shared/styles/typography.css";
3+
import { style } from "@vanilla-extract/css";
4+
5+
export const notice = style({
6+
padding: "1.6rem 2rem",
7+
backgroundColor: color.white[300],
8+
borderRadius: "1.2rem",
9+
display: "flex",
10+
flexDirection: "column",
11+
gap: "0.8rem",
12+
margin: "2.4rem 0 1.6rem 0",
13+
cursor: "default",
14+
});
15+
16+
export const noticeTitle = style({
17+
...typographyVars.body3,
18+
color: color.black[100],
19+
whiteSpace: "pre-line",
20+
});
21+
22+
export const noticeDescription = style({
23+
...typographyVars.caption2,
24+
color: color.gray[100],
25+
whiteSpace: "pre-line",
26+
});
27+
28+
export const customerCenter = style({
29+
textDecorationLine: "underline",
30+
});
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import * as styles from "./purchase-safety-notice.css";
2+
3+
export const PurchaseSafetyNotice = () => {
4+
return (
5+
<div className={styles.notice}>
6+
<div className={styles.noticeTitle}>
7+
안전한 거래를 위해 {"\n"}
8+
아이디어스 결제 시스템을 이용해주세요.
9+
</div>
10+
<div className={styles.noticeDescription}>
11+
개인 연락처를 통한 거래는 보호 및 중재가 어려울 수 있습니다. {"\n"}
12+
작가님의 외부 거래 요청이 있다면{" "}
13+
<a
14+
href="#"
15+
onClick={(e) => e.preventDefault()}
16+
className={styles.customerCenter}>
17+
고객센터
18+
</a>
19+
로 알려주세요.
20+
</div>
21+
</div>
22+
);
23+
};

0 commit comments

Comments
 (0)