UNPKG

lost-sia

Version:

Single Image Annotation Tool

2 lines (1 loc) 658 B
import{jsxs as l,jsx as p}from"react/jsx-runtime";const x=({name:n,color:t="#2185d0",size:o=32,style:s={},triangleSize:e=22,onClick:r})=>{const a={display:"inline-flex",alignItems:"center",backgroundColor:t,color:"#000",height:`${o}px`,fontSize:`${o*.45}px`,padding:"0 1rem 0 0.75rem",borderRadius:"0 0.25rem 0.25rem 0",marginLeft:`${e/1.4}px`,position:"relative",overflow:"visible",cursor:r?"pointer":"default",...s},i={position:"absolute",left:`-${e/2}px`,width:`${e}px`,height:`${e}px`,backgroundColor:t,transform:"rotate(45deg)",zIndex:-1,pointerEvents:"none"};return l("span",{style:a,onClick:r,children:[p("span",{style:i}),n]})};export{x as default};