import React from 'react'; export type SizeType = 'small' | 'middle' | 'large' | undefined; export type Size = SizeType | number; export interface SpaceProps extends React.HTMLAttributes { /** 间距方向 */ direction?: 'vertical' | 'horizontal'; /** 间距大小 */ size?: Size | Size[]; /** 设置拆分,相邻组件分隔符 */ split?: React.ReactNode; /** 是否自动换行, 仅在`horizontal`时有效 */ wrap?: boolean; } export interface SpaceItemProps { className?: string; children: React.ReactNode; index: number; lastIndex: number; verticalSize: number; horizontalSize: number; direction?: 'vertical' | 'horizontal'; marginDirection?: 'marginLeft' | 'marginRight'; split?: React.ReactNode; wrap?: boolean; style?: React.CSSProperties; }