Skip to content
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

[Feat] : 구매 상세 페이지 UI 수정 #58

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/MinusButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/PlusButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/ph_x-bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pages/product/ProductContainer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import ProductImage from "../../assets/ProductDetailIamge.png";
import ProductTextBox from "./ProductTextBox";
import ProductTextBox from "./ProductBox";
import ProductOption from "./ProductOption";
import ProductPriceGroup from "./ProductPriceGroup";
import ProductButtonGroup from "./ProductButtonGroup";
Expand Down
67 changes: 59 additions & 8 deletions src/pages/product/SelectProduct.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,77 @@
import React from "react";
import React, { useState } from "react";
import { COLORS } from "../../styles/colors";
import MinusButton from "../../assets/MinusButton.png";
import PlusButton from "../../assets/PlusButton.png";

const SelectProduct = () => {
const [quantity, setQuantity] = useState(1);

const newComponentStyle = {
width: "100%",
width: "90%",
height: "140px",
borderRadius: "20px",
backgroundColor: "#F4F8FD",
marginTop: "16px", // 선택한 메뉴와 간격 조절
marginTop: "16px",
display: "flex",
justifyContent: "center",
justifyContent: "space-between",
alignItems: "center",
padding: "0 16px",
};

const leftTextStyle = {
fontSize: "20px",
color: COLORS.GRAY_900,
fontWeight: "bold",
marginLeft: "16px",
};

const optionTextStyle = {
fontSize: "16px",
color: COLORS.GRAY_900,
marginLeft: "16px",
};

const iconGroupStyle = {
display: "flex",
alignItems: "center",
margin: "40px",
};

const iconStyle = {
width: "32px",
height: "32px",
color: COLORS.BLACK,
cursor: "pointer",
margin: "8px",
};

const quantityStyle = {
fontSize: "24px",
fontWeight: "bold",
color: COLORS.BLACK,
};

const handleDecrease = () => {
if (quantity > 1) {
setQuantity(quantity - 1);
}
};

const textStyle = {
color: COLORS.GRAY_600,
fontSize: "B1",
const handleIncrease = () => {
setQuantity(quantity + 1);
};

return (
<div style={newComponentStyle}>
<span style={textStyle}>이 새로운 컴포넌트 내용</span>
<div>
<div style={leftTextStyle}>하이카디플러스 HiCardi+</div>
<div style={optionTextStyle}>갤럭시 A13 (+275,000원)</div>
</div>
<div style={iconGroupStyle}>
<img onClick={handleDecrease} style={iconStyle} src={MinusButton} alt="Minus" />
<span style={quantityStyle}>{quantity}</span>
<img onClick={handleIncrease} style={iconStyle} src={PlusButton} alt="Plus" />
</div>
</div>
);
};
Expand Down