reablocks
Version:
Component library for React
47 lines (45 loc) • 1.05 kB
TypeScript
import { EllipsisTheme } from './EllipsisTheme';
import { FC } from 'react';
export interface EllipsisProps {
/**
* The value to ellipsis.
*/
value: string;
/**
* Whether you can expand or not. Default: true.
*/
expandable?: boolean;
/**
* Limit of characters to show. Default: 256.
*/
limit?: number;
/**
* The title text to show on the hover.
*/
title?: string | false;
/**
* Remove line breaks or not.
*/
removeLinebreaks?: boolean;
/**
* Class name for the container.
*/
className?: string;
/**
* Theme for the Ellipsis.
*/
theme?: EllipsisTheme;
/**
* Number of lines to show before truncation. If set, overrides the character limit.
*/
lines?: number;
/**
* Custom text for the expand button. Default: "..."
*/
moreText?: string;
/**
* Custom text for the collapse button. Default: "Show less"
*/
lessText?: string;
}
export declare const Ellipsis: FC<EllipsisProps>;