Skip to content

Commit

Permalink
feat: loading #33 (#35)
Browse files Browse the repository at this point in the history
Co-authored-by: Jiwon <[email protected]>
  • Loading branch information
bokoo14 and raipen authored Apr 1, 2023
1 parent 0e4322d commit 3fd8a05
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
22 changes: 22 additions & 0 deletions summe/src/component/graph/GraphLoading.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* LoadingBox 회전하는 로딩 중 표시 */
.loading-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 100px;
border: 10px solid #f3f3f3;
border-top: 10px solid #3498db;
border-radius: 50%;
animation: spin 2s linear infinite;
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
10 changes: 4 additions & 6 deletions summe/src/component/graph/GraphWrapper.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import ApexCharts from "react-apexcharts";
import "./GraphLoading.css";
import "./GraphTitle.css";

// 회전하는 로딩 중 표시
const LoadingBox = () => {
return (
<div style={{ height: "100%", width: "100%" }}>
로딩중 ...
</div>
);
return <div className="loading-box"></div>;
};

const GraphTitle = ({ title, description }) => {
Expand Down Expand Up @@ -38,4 +36,4 @@ export default function GraphWrapper({ data, type, height, width, title = "그
}
</div>
);
}
}

0 comments on commit 3fd8a05

Please sign in to comment.