Monitors:hosts, with some bugs and challenges to fix
This commit is contained in:
1 parent
7bd4ce9e6a
commit
f5bfb738b0
19 files changed
+422
-3
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import "./barChart.css";
|
||||
|
||||
const BarChart = () => {
|
||||
const data = Array.from({ length: 12 }, () =>
|
||||
Math.floor(Math.random() * 100)
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="bar-chart">
|
||||
{data.map((value, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`bar ${index < 6 ? "green" : "red"}`}
|
||||
style={{ height: `${value}%` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default BarChart;
|
||||
@@ -0,0 +1,20 @@
|
||||
.bar-chart {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
height: 50px;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.bar {
|
||||
width: 7%;
|
||||
transition: height 0.3s ease;
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: var(--env-var-color-23);
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: var(--env-var-color-24);
|
||||
}
|
||||
Reference in new issue
Block a user