Skip to content

Commit

Permalink
[Feat] 주가 및 주문설정 관련 레이아웃 일부 구현
Browse files Browse the repository at this point in the history
- 주가 및 주문설정 관련 전체 레이아웃 설정
- 레이아웃 내부에 들어가는 요소 구현 중

Issues #12
  • Loading branch information
novice1993 committed Aug 31, 2023
1 parent 679c2b7 commit 2e77a51
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,31 @@ import { styled } from "styled-components";

import UpperBar from "./UpperBar";
import StockName from "./StockName";
import OrderRequest from "./OrderRequest";
import OrderResult from "./OrderResult";

const StockOrder = () => {
const StockOrderSection = () => {
return (
<Container>
<UpperBar />
<StockName />
<OrderRequest />
<OrderResult />
</Container>
);
};

export default StockOrder;
export default StockOrderSection;

const Container = styled.aside`
// 우측 슬라이드 관련 설정
position: fixed;
right: 0px;
transition: right 0.3s ease-in-out;
//
display: flex;
flex-direction: column;
flex: 3.3 0 0;
min-width: 400px;
Expand Down
23 changes: 23 additions & 0 deletions client/src/components/StockOrderSection/OrderRequest.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { styled } from "styled-components";

import StockPriceInfo from "./StockPriceInfo";
import StockOrderSetting from "./StockOrderSetting";

const OrderRequest = () => {
return (
<Container>
<StockPriceInfo />
<StockOrderSetting />
</Container>
);
};

export default OrderRequest;

const Container = styled.div`
height: 414px;
border-bottom: 1px solid black;
display: flex;
flex-direction: row;
`;
12 changes: 12 additions & 0 deletions client/src/components/StockOrderSection/OrderResult.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { styled } from "styled-components";

const OrderResult = () => {
return <Container></Container>;
};

export default OrderResult;

const Container = styled.div`
flex: 1 0 0;
border-bottom: 1px solid black;
`;
41 changes: 41 additions & 0 deletions client/src/components/StockOrderSection/StockOrderSetting.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { styled } from "styled-components";

const orderType01: string = "매수";
const orderType02: string = "매도";

const StockOrderSetting = () => {
return (
<Container>
<OrderType>
<div className="buying">{orderType01}</div>
<div className="selling">{orderType02}</div>
</OrderType>
</Container>
);
};

export default StockOrderSetting;

const Container = styled.div`
width: 208px;
height: 100%;
border-left: 1px solid black;
border-right: 1px solid black;
`;

const OrderType = styled.div`
width: 100%;
height: 32px;
display: flex;
flex-direction: row;
& div {
flex: 1 0 0;
display: flex;
justify-content: center;
align-items: center;
height: 31px;
font-size: 14px;
border-bottom: 1px solid darkgray;
}
`;
37 changes: 37 additions & 0 deletions client/src/components/StockOrderSection/StockPriceInfo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { styled } from "styled-components";

const StockPriceInfo = () => {
return (
<Container>
<HighFigure></HighFigure>
<PriceInfo></PriceInfo>
<LowerFigure></LowerFigure>
</Container>
);
};

export default StockPriceInfo;

const Container = styled.div`
width: 160px;
height: 100%;
margin-right: 16px;
border-right: 1px solid black;
`;

const HighFigure = styled.div`
width: 100%;
height: 32px;
border-bottom: 1px solid black;
`;

const PriceInfo = styled.div`
width: 100%;
height: 348px;
border-bottom: 1px solid black;
`;

const LowerFigure = styled.div`
width: 100%;
height: 32px;
`;
4 changes: 2 additions & 2 deletions client/src/page/MainPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { styled } from "styled-components";

import LoginHeader from "../components/Headers/LoginHeader";
import StockOrder from "../components/StockOrder/Index";
import StockOrderSection from "../components/StockOrderSection/Index";

const MainPage = () => {
return (
Expand All @@ -10,7 +10,7 @@ const MainPage = () => {
<Main>
<LeftSection></LeftSection>
<CentralSection></CentralSection>
<StockOrder />
<StockOrderSection />
{/* <RightSection></RightSection> */}
</Main>
</Container>
Expand Down

0 comments on commit 2e77a51

Please sign in to comment.