UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

23 lines (22 loc) 648 B
import { JsxNode } from '@arcgis/lumina'; /** * Capitalizes the first letter in a provided word. * Assumes an unbroken string of text representing a single word. * * @param word string */ export declare function capitalizeWord(word: string): string; /** * Highlight text based on a search pattern. * * Items using this in their rendering should include the `text-highlight-item` mixin from `includes.scss` in their styles. * * @param text.text * @param text * @param pattern * @param text.pattern */ export declare function highlightText({ text, pattern, }: { text: string; pattern: RegExp; }): string | (string | JsxNode)[];