Building Owner and Property Manager Screens are added
This commit is contained in:
29
utils/barchart.tsx
Normal file
29
utils/barchart.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import {BarChartProps} from "@/constants/types";
|
||||
|
||||
|
||||
|
||||
export default function BarChart({ data }: BarChartProps) {
|
||||
return (
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
{/* Bars */}
|
||||
<div className="flex items-end justify-between h-40 px-2 border-b border-[#1b3454] pb-2">
|
||||
{data.map((item, idx) => (
|
||||
<div key={idx} className="flex flex-col items-center flex-1 group">
|
||||
<div className={`w-5 ${item.height} bg-teal-400 rounded-t transition-all duration-300 group-hover:bg-teal-300`} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* X-Axis */}
|
||||
<div className="flex justify-between pt-3 px-2 text-xs font-medium text-gray-500">
|
||||
{data.map((item, idx) => (
|
||||
<span key={idx} className="w-5 text-center">{item.month}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user