@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
32 lines (31 loc) • 1.52 kB
TypeScript
import type { CommonProps } from '../../types/index.js';
import type { TextPropTypes } from '../../webComponents/Text/index.js';
export interface ExpandableTextPropTypes extends Omit<TextPropTypes, 'maxLines' | 'children'>, CommonProps {
/**
* Determines the text to be displayed.
*/
children?: string;
/**
* Specifies the maximum number of characters from the beginning of the text field that are shown initially.
*
* @default 100
*/
maxCharacters?: number;
/**
* Determines if the full text should be displayed inside a `ResponsivePopover` or in-place.
*/
showOverflowInPopover?: boolean;
/**
* Defines how white-space inside <code>Text</code> is handled. If set to true, sequences of white space are preserved.
*/
renderWhitespace?: boolean;
}
/**
* The `ExpandableText` component can be used to display long texts inside a table, list or form.
*
* Initially, only the first characters from the text are shown with a "Show More" link which allows the full text to be displayed. The `showOverflowInPopover` property determines if the full text will be displayed expanded in place (default) or in a popover (`showOverflowInPopover: true`). If the text is expanded a "Show Less" link is displayed, which allows collapsing the text field.
*
* @since 1.23.0
*/
declare const ExpandableText: import("react").ForwardRefExoticComponent<ExpandableTextPropTypes & import("react").RefAttributes<HTMLSpanElement>>;
export { ExpandableText };