Inner text
For instances where accessing the text content of a component that may be wrapped or interspersed with other components, two utilities are available:
- useInnerText- A custom React hook, usable in function components
- <EuiInnerText />- A higher order- useInnerTextcomponent for use in class components
Both utilities make available a ref reference to add to the target DOM element, and the resulting innerText value to use as needed.
Rendered
Loading...
Props
EuiInnerText
| Prop | Description and type | Default value | 
|---|---|---|
| Prop children# | Description and type ReactNode to render as this component's content (ref?: (node: RefT) => void, innerText?: string) => ReactElement<any, string | JSXElementConstructor<any>> | Default value Required | 
| Prop fallback# | Description and type Type:  string | Default value |