Skip to content

Commit

Permalink
feat: #247 통계 전용 그래프 박스 컴포넌트
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjeonghyun committed Sep 6, 2024
1 parent f89b7bb commit b5bf551
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/GraphBox/GraphBox.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { useState } from 'react';
import * as S from './GraphBox.style';

const GraphBox = ({ category, children }) => {
return (
<>
<S.Wrapper>
<S.Label>{category}</S.Label>
<S.Box>{children}</S.Box>
</S.Wrapper>
</>
);
};

export default GraphBox;
33 changes: 33 additions & 0 deletions src/components/GraphBox/GraphBox.style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import styled, { css } from 'styled-components';

export const Wrapper = styled.div`
display: flex;
flex-direction: column;
margin: 20px 0;
`;

export const Label = styled.div`
position: relative;
font-size: 28px;
font-weight: 600;
color: #0d0d0d;
text-align: left;
`;

export const Box = styled.div`
max-width: 100%;
position: relative;
border-radius: 20px;
border: 1px solid #aecfff;
box-sizing: border-box;
overflow: auto;
padding: 20px;
margin: 28px 0;
height: 332px;
* {
max-width: 100%;
height: auto;
display: block;
}
`;
1 change: 1 addition & 0 deletions src/components/GraphBox/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as GraphBox } from './GraphBox';
2 changes: 2 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ export * from './Sidebar';
export * from './Table';
export * from './TabMenu';
export * from './Footer';
export * from './DaterangePicker';
export * from './GraphBox';

0 comments on commit b5bf551

Please sign in to comment.