UNPKG

lost-sia

Version:

Single Image Annotation Tool

2 lines (1 loc) 720 B
import{jsx as n,jsxs as i}from"react/jsx-runtime";import c from"./Prompt.js";import"react";import{Card as t,Image as d}from"semantic-ui-react";const s=e=>{const m=l=>{l.stopPropagation(),e.onRequestExample&&e.onRequestExample()},o=()=>{if(!e.lbl||!e.exampleImg)return null;const l=i("div",{children:[e.lbl.description,n("h4",{children:"Comment:"}),e.exampleImg.anno?e.exampleImg.anno.comment:"no comment"]});return n("div",{children:i(t,{children:[n(d,{onClick:a=>m(a),src:e.exampleImg.img,wrapped:!0,ui:!1}),i(t.Content,{children:[n(t.Header,{children:e.lbl.label}),n(t.Description,{children:l})]})]})})},r=()=>{e.onClose&&e.onClose()};return n(c,{onClick:()=>{r()},active:e.active,content:o()})};export{s as default};