UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

53 lines (52 loc) 2.28 kB
import '@ui5/webcomponents/dist/Text.js'; import type TextEmptyIndicatorMode from '@ui5/webcomponents/dist/types/TextEmptyIndicatorMode.js'; import type { CommonProps, Ui5DomRef } from '@ui5/webcomponents-react-base'; import type { ReactNode } from 'react'; interface TextAttributes { /** * Specifies if an empty indicator should be displayed when there is no text. * * **Note:** Available since [v2.2.0](https://github.com/UI5/webcomponents/releases/tag/v2.2.0) of **@ui5/webcomponents**. * @default "Off" */ emptyIndicatorMode?: TextEmptyIndicatorMode | keyof typeof TextEmptyIndicatorMode; /** * Defines the number of lines the text should wrap before it truncates. * @default Infinity */ maxLines?: number; } interface TextDomRef extends Required<TextAttributes>, Ui5DomRef { } interface TextPropTypes extends TextAttributes, Omit<CommonProps, keyof TextAttributes | 'children'> { /** * Defines the text of the component. * * __Supported Node Type/s:__ `Array<Node>` */ children?: ReactNode | ReactNode[]; } /** * The `Text` component displays text that can be used in any content area of an application. * * ### Usage * * - Use the `Text` if you want to display text inside a form, table, or any other content area. * - Do not use the `Text` if you need to reference input type of components (use ui5-label). * * ### Responsive behavior * * The `Text` component is fully adaptive to all screen sizes. * By default, the text will wrap when the space is not enough. * In addition, the component supports truncation via the `max-lines` property, * by defining the number of lines the text should wrap before start truncating. * * * * __Note:__ This is a UI5 Web Component! [Text UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/Text) | [Repository](https://github.com/UI5/webcomponents) * * @since [2.0.0](https://github.com/UI5/webcomponents/releases/tag/v2.0.0) of __@ui5/webcomponents__. */ declare const Text: import("react").ForwardRefExoticComponent<TextPropTypes & import("@ui5/webcomponents-react-base").WithWebComponentPropTypes & import("react").RefAttributes<TextDomRef>>; export { Text }; export type { TextDomRef, TextPropTypes };