import React from "react"; import styled from "styled-components"; import { useStoreState } from "../../appstore"; import {DocumentPage, TableCell} from "../../appstore/models"; const BoxAnnotationLayerContainer = styled.div` position: absolute; top: 0; left: 0; height: 100%; width: 100%; `; interface BoundingBoxProps { top: number; bottom: number; left: number; right: number; isSelected: boolean; } const BoundingBox = styled.div` position: absolute; top: ${(props) => props.top}%; bottom: ${(props) => props.bottom}%; left: ${(props) => props.left}%; right: ${(props) => props.right}%; background: ${(props) => props.isSelected?`rgba(0, 123, 255, 0.2)`:"none"}; `; const BoxAnnotationLayer = (props: { pageIndex: number }) => { const selectedTag = useStoreState((s) => s.internal.selectedTag); const cells = useStoreState((s) => { const pages = [...s.documentModel.documentPages]; let currentPage: DocumentPage = pages[0]; for(let i=0;i {cells.map((cell, index) => ( ))} ); }; export default BoxAnnotationLayer;