UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

29 lines (28 loc) 977 B
import React from "react"; import { TestableComponent } from "../../components/interfaces"; export interface OverflowTextProps extends React.HTMLAttributes<HTMLElement>, TestableComponent { /** * How is ellipsis used to cut text overflows. * Use `reverse`to use the ellipis on text start and display the end of the text. */ ellipsis?: "add" | "reverse" | "none"; /** * Display component as inline element. */ inline?: boolean; /** * Using text overflow on all children elements. */ passDown?: boolean; /** * Additional CSS class name. */ className?: string; /** * HTML element that is used for the component. */ useHtmlElement?: "p" | "div" | "span"; } /** Prevents text from overflowing. */ export declare const OverflowText: ({ className, children, ellipsis, inline, passDown, useHtmlElement, ...otherProps }: OverflowTextProps) => React.JSX.Element; export default OverflowText;