amotify
Version:
UI Component for React,NextJS,esbuild
2 lines (1 loc) • 642 B
JavaScript
import"../chunk-C5N2D3ZX.js";import{jsx as a,jsxs as g}from"react/jsx-runtime";import i from"jmini";import{Box as c,Span as n}from"../atoms";const l=(e,o)=>{if(!i.isString(e)||!o)return e;let r=[e];return i.scope(()=>{let p=new RegExp(String(o).escapeRegExChar(),"ig"),s=e.match(p);s&&(r=[],e.split(p).forEach((m,t)=>{r.push(a(n,{children:m},t),g(n,{ssZIndex:1,children:[a(c,{position:"absolute",bottom:0,backgroundColor:"warn",borderRadius:"1/3",opacity:"middle",ssZIndex:1,xcss:{pointerEvents:"none",left:"-2%",right:"-2%",height:"28%"}}),a(n,{ssZIndex:1,children:s[t]})]},"marker-"+t))}),r.pop())}),r};export{l as MarkerPen,l as default};