Skip to content

Commit

Permalink
๐Ÿ’„ Design: ์ง€์ถœ ๋‚ด์—ญ Item ๋””์ž์ธ (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
alwn8918 committed Sep 14, 2024
1 parent 3e08386 commit 90c8eaa
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
18 changes: 17 additions & 1 deletion acoountbook/src/components/home/content/Content.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
import * as C from "./Content.style";
import ContentItem from "./ContentItem";

export default function Content() {
return <C.Container>content</C.Container>;
return (
<C.Container>
<ContentItem
date="2024-01-05"
category="์‹๋น„"
content="์„ธ๊ด‘์–‘๋Œ€์ฐฝ"
price="100,000์›"
/>
<ContentItem
date="2024-01-10"
category="๋„์„œ"
content="๋ชจ๋˜ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ"
price="40,500์›"
/>
</C.Container>
);
}
7 changes: 6 additions & 1 deletion acoountbook/src/components/home/content/Content.style.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import styled from "styled-components";

export const Container = styled.div`
display: flex;
flex-direction: column;
gap: 10px;
padding: 20px;
background-color: white;
border-radius: 16px;
padding: 20px;
`;
15 changes: 15 additions & 0 deletions acoountbook/src/components/home/content/ContentItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as C from "./ContentItem.style";

export default function ContentItem({ date, category, content, price }) {
return (
<C.Container>
<div>
<C.Date>{date}</C.Date>
<C.Content>
{category} - {content}
</C.Content>
</div>
<C.Price>{price}</C.Price>
</C.Container>
);
}
36 changes: 36 additions & 0 deletions acoountbook/src/components/home/content/ContentItem.style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import styled from "styled-components";

export const Container = styled.div`
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 20px;
border-radius: 8px;
background-color: rgb(249, 249, 249);
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px;
cursor: pointer;
`;

export const Date = styled.div`
margin-bottom: 5px;
color: rgb(102, 102, 102);
font-size: 14px;
`;

export const Content = styled.div`
font-size: 16px;
font-weight: bold;
color: #92b1d4;
flex-shrink: 0;
`;

export const Price = styled.div`
font-size: 16px;
font-weight: bold;
color: #92b1d4;
flex-shrink: 0;
`;

0 comments on commit 90c8eaa

Please sign in to comment.