π¬ A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots π
TypeScript browser-extensionchrome-extensiondocumentationfirefox-extensionguide-generatorlocal-firstmanifest-v3privacy-firstproductivityreactscreenshotstep-by-step-guidetutorialtypescriptworkflowwxt
export function MatchText({ text, query }: { text: string; query: string }) {
const start = query ? text.toLowerCase().indexOf(query.toLowerCase()) : -1;
if (start < 0) return <>{text}</>;
const end = start + query.length;
return (
<>
{text.slice(0, start)}
<mark className="rounded-[3px] bg-lavender px-px text-foreground">{text.slice(start, end)}</mark>
{text.slice(end)}
</>
);
}