UNPKG

@yuntijs/ui

Version:

☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps

44 lines (43 loc) 1.59 kB
import React from 'react'; import { type ButtonGroupProps } from "../../ButtonGroup"; import { StatusProps } from "../../Status"; import { HeaderIconProps } from './Icon'; export interface PageHeaderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> { /** 是否有边框,默认没有 */ bordered?: boolean; /** 状态 */ status?: StatusProps; /** 图标 src 路径或者详细配置 */ icon?: string | HeaderIconProps; /** 标题 */ title?: React.ReactNode; /** 标题自定义渲染 */ titleRender?: (titleElement: React.ReactNode) => React.ReactNode; /** 副标题:例如描述等 */ subTitle?: React.ReactNode; /** 描述列表 */ descriptions?: { icon?: { content: React.ReactNode; tooltip?: string; }; text: React.ReactNode; }[]; /** 描述列表自定义渲染 */ descriptionsRender?: (descriptionsElement: React.ReactNode) => React.ReactNode; /** 右侧扩展区域 */ extraContent?: ButtonGroupProps; /** 右侧扩展区域自定义渲染 */ extraContentRender?: (buttonsElement: React.ReactNode) => React.ReactNode; /** 控制 header 与 content 的分割线,当 bordered 为 true 时,divider 自动设置为 false */ divider?: boolean; /** PageHeader 各个模块的 className */ classNames?: { titleWrapper?: string; title?: string; subTitle?: string; descriptions?: string; extraContent?: string; }; } export declare const PageHeader: React.FC<PageHeaderProps>;