mirror of
https://github.com/azaion/ui.git
synced 2026-04-22 16:06:34 +00:00
Azaion Suite to the web. First commit. Only rough sketches of future components is done.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// src/components/DetectionContainer.js
|
||||
import React from 'react';
|
||||
import Detection from './Detection';
|
||||
|
||||
function DetectionContainer({ detections, selectedDetectionIndices, calculateColor, onDetectionMouseDown, currentDetection, onResize }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
{detections.map((detection, index) => (
|
||||
<Detection
|
||||
key={index}
|
||||
detection={detection}
|
||||
isSelected={selectedDetectionIndices.includes(index)}
|
||||
onDetectionMouseDown={(e) => onDetectionMouseDown(e, index)}
|
||||
onResize={(e, position) => onResize(e, index, position)}
|
||||
/>
|
||||
))}
|
||||
{currentDetection && (
|
||||
<Detection
|
||||
detection={currentDetection}
|
||||
isSelected={false}
|
||||
onDetectionMouseDown={() => {}} // No-op handler for the current detection
|
||||
onResize={() => {}} // No-op handler for the current detection
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default DetectionContainer;
|
||||
Reference in New Issue
Block a user