11 lines
349 B
TypeScript
11 lines
349 B
TypeScript
export function MiniBars({ values }: { values: number[] }) {
|
|
const max = Math.max(...values);
|
|
return (
|
|
<div className="flex h-24 items-end gap-2">
|
|
{values.map((value, index) => (
|
|
<div key={`${value}-${index}`} className="flex-1 rounded-t bg-mint/75" style={{ height: `${(value / max) * 100}%` }} />
|
|
))}
|
|
</div>
|
|
);
|
|
}
|