UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

2 lines (1 loc) 378 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");exports.TextHighlighter=({text:t,highlight:r=""})=>{if(!r)return t;const i=r.toLowerCase(),s=t.toLowerCase().indexOf(i);if(-1===s)return t;const n=t.slice(0,s),l=t.slice(s,s+r.length),c=t.slice(s+r.length);return e.jsxs(e.Fragment,{children:[n,e.jsx("b",{children:l}),c]})};