components/Highlighted
import { … } from 'zidane-ui'ui/src/components/Highlighted.tsx
Components#
HighlightedComponent#
text with the characters at indices (a search match) in the accent. One
inline box, so a flex or grid parent lays it out as one item, not one per run.
Offsets are UTF-16 positions, and an emoji counts as matched when either of its units is.
function Highlighted(props: HighlightedProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | HighlightedProps | Component props. |
Returns
ElementProps
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the wrapping |
| indices | readonly number[] | UTF-16 offsets in |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
| text | string | The full text to render. |
Interfaces#
HighlightedPropsInterface#
Props for Highlighted.
interface HighlightedPropsProperties
| Name | Type | Description |
|---|---|---|
| className? | string | Extra classes on the wrapping |
| indices | readonly number[] | UTF-16 offsets in |
| style? | CSSProperties | Inline styles on the root element, merged after the component's own. |
| text | string | The full text to render. |