mr-component
Version:
A library for Mr components
37 lines (36 loc) • 1.1 kB
TypeScript
import * as React from 'react';
import './index.scss';
export interface MrTitleProps {
/** 标题文本 */
title?: string;
/** 是否显示返回按钮 */
showBack?: boolean;
/** 返回按钮图标 */
backIcon?: React.ReactNode;
/** 标题文本颜色 */
titleColor?: string;
/** 背景颜色 */
backgroundColor?: string;
/** 标题栏高度 */
height?: number | string;
/** 是否固定在顶部 */
fixed?: boolean;
/** 是否适配安全区域 */
safeArea?: boolean;
/** 是否显示底部边框 */
showBorder?: boolean;
/** 标题最大字符数,超出显示省略号 */
maxLength?: number;
/** 字体大小 */
fontSize?: number | string;
/** 字体粗细 */
fontWeight?: number | string;
/** 返回按钮点击事件 */
onBack?: () => void;
/** 自定义类名 */
className?: string;
/** 自定义样式 */
style?: React.CSSProperties;
}
declare const RefMrTitle: React.ForwardRefExoticComponent<MrTitleProps & React.RefAttributes<HTMLDivElement>>;
export default RefMrTitle;