apphouse
Version:
Component library for React that uses observable state management and theme-able components.
29 lines (28 loc) • 736 B
TypeScript
import React from 'react';
type TextHighlighterProps = {
/**
* The text to be highlighted
*/
input: string;
/**
* The start index of the text to be highlighted
* @default 0
*/
startIndex?: number;
/**
* The end index of the text to be highlighted
* @default 0
*/
endIndex?: number;
/**
* A style in css string format to be applied to the highlighted text
* @default 'background-color: #FFC107; color: #000000; border-radius: 4px; font-family: inherit; font-size: inherit;'
*
*/
highlightStyle?: string;
};
/**
* A component that highlights a portion of text
*/
export declare const TextHighlighter: React.FC<TextHighlighterProps>;
export {};