This commit is contained in:
gpt-engineer-app[bot]
2026-02-27 01:13:10 +00:00
parent 1709a8e9e4
commit 379f3f96e6
5 changed files with 235 additions and 14 deletions
+37
View File
@@ -0,0 +1,37 @@
import { Ruler, X } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { useModelStore } from '@/stores/useModelStore';
export function MeasurementsList() {
const { measurements, removeMeasurement } = useModelStore();
if (measurements.length === 0) return null;
return (
<div className="space-y-2">
<h3 className="font-mono text-xs font-semibold uppercase tracking-widest text-muted-foreground">
Medições
</h3>
<div className="space-y-1.5">
{measurements.map((m, i) => (
<div key={m.id} className="flex items-center justify-between rounded-lg border bg-muted/30 px-3 py-2">
<div className="flex items-center gap-2">
<Ruler className="h-3.5 w-3.5 text-success" />
<span className="font-mono text-xs text-foreground">
M{i + 1}: <span className="text-success font-bold">{m.distanceMM.toFixed(1)} mm</span>
</span>
</div>
<Button
variant="ghost"
size="icon"
className="h-6 w-6"
onClick={() => removeMeasurement(m.id)}
>
<X className="h-3 w-3 text-muted-foreground" />
</Button>
</div>
))}
</div>
</div>
);
}