import React from "react"; import { View, Text } from "react-native"; import { useBoundingBoxStyle, ImageScale, BoundingBox } from "../hooks"; export interface BoundingBoxProps { box: BoundingBox; scale: ImageScale; testId?: string; } export const BoundingBoxView: React.FC = ({ box, scale, testId, }) => { const boxStyle = useBoundingBoxStyle(box, scale); const { origin: { x, y }, size: { x: w, y: h }, label, } = box; const newTestId = `${testId}--boundingBox--x${x}y${y}-w${w}h${h}`; return ( {box.label && ( {label} )} ); };