UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

41 lines (40 loc) 1.27 kB
import React, { ForwardRefExoticComponent, PropsWithoutRef, ReactNode, RefAttributes } from 'react'; import { TypographyProps } from '../Typography'; export declare type BaseType = 'secondary' | 'success' | 'warning' | 'danger'; export interface CopyConfig { text?: string; onCopy?: () => void; icon?: ReactNode; tooltips?: boolean | ReactNode; } export interface EllipsisConfig { rows?: number; expandable?: boolean; suffix?: string; symbol?: ReactNode; onExpand?: React.MouseEventHandler<HTMLElement>; onEllipsis?: (ellipsis: boolean) => void; tooltip?: ReactNode; } export interface BlockProps extends TypographyProps { copyable?: boolean | CopyConfig; type?: BaseType; disabled?: boolean; ellipsis?: boolean | EllipsisConfig; component?: string; code?: boolean; mark?: boolean; underline?: boolean; delete?: boolean; strong?: boolean; keyboard?: boolean; italic?: boolean; } export interface BaseBlockProps extends BlockProps { title?: string | ReactNode; } export interface IBase extends ForwardRefExoticComponent<PropsWithoutRef<BaseBlockProps> & RefAttributes<HTMLDivElement>> { _PRO_TYPOGRAPHY_BASE?: boolean; } declare const Base: IBase; export default Base;