@cainiaofe/cn-ui-m
Version:
94 lines (93 loc) • 3.99 kB
TypeScript
import * as React from 'react';
import { BasicComponentProps } from "../../types";
export interface TextProps extends BasicComponentProps {
/**
* 添加删除线样式
*/
delete?: boolean;
/**
* 添加标记样式
*/
mark?: boolean;
/**
* 添加下划线样式
*/
underline?: boolean;
/**
* 是否加粗
*/
strong?: boolean;
/**
* 添加代码样式
*/
code?: boolean;
/**
* 设置展示标签
*/
component?: React.ElementType;
}
export declare const Text: {
(props: React.PropsWithChildren<TextProps>): React.JSX.Element;
defaultProps: {
delete: boolean;
mark: boolean;
underline: boolean;
strong: boolean;
code: boolean;
component: string;
};
};
export declare const createText: (displayName: string, className: string) => {
new (props: TextProps | Readonly<TextProps>): {
render(): React.JSX.Element;
context: any;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TextProps>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<TextProps> & Readonly<{
children?: React.ReactNode;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly<TextProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<TextProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<TextProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<TextProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TextProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<TextProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<TextProps>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: TextProps, context: any): {
render(): React.JSX.Element;
context: any;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TextProps>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<TextProps> & Readonly<{
children?: React.ReactNode;
}>;
state: Readonly<{}>;
refs: {
[key: string]: React.ReactInstance;
};
componentDidMount?(): void;
shouldComponentUpdate?(nextProps: Readonly<TextProps>, nextState: Readonly<{}>, nextContext: any): boolean;
componentWillUnmount?(): void;
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
getSnapshotBeforeUpdate?(prevProps: Readonly<TextProps>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<TextProps>, prevState: Readonly<{}>, snapshot?: any): void;
componentWillMount?(): void;
UNSAFE_componentWillMount?(): void;
componentWillReceiveProps?(nextProps: Readonly<TextProps>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<TextProps>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<TextProps>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<TextProps>, nextState: Readonly<{}>, nextContext: any): void;
};
displayName: string;
contextType?: React.Context<any>;
};