UNPKG

lost-sia

Version:

Single Image Annotation Tool

2 lines (1 loc) 669 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 i={display:"inline-flex",alignItems:"center",backgroundColor:t,color:"#000",height:`${o}px`,fontSize:`${o*.45}px`,padding:"0 1rem 0 0.75rem",border:0,borderRadius:"0 0.25rem 0.25rem 0",marginLeft:`${e/1.4}px`,position:"relative",overflow:"visible",cursor:r?"pointer":"default",...s},a={position:"absolute",left:`-${e/2}px`,width:`${e}px`,height:`${e}px`,backgroundColor:t,transform:"rotate(45deg)",zIndex:-1,pointerEvents:"none"};return l("button",{style:i,onClick:r,children:[p("span",{style:a}),n]})};export{x as default};