UNPKG

1.02 kBTypeScriptView Raw
1import * as React from 'react';
2import type { DirectionType } from '../config-provider';
3import type { SizeType } from '../config-provider/SizeContext';
4export interface SpaceCompactItemContextType {
5 compactSize?: SizeType;
6 compactDirection?: 'horizontal' | 'vertical';
7 isFirstItem?: boolean;
8 isLastItem?: boolean;
9}
10export declare const SpaceCompactItemContext: React.Context<SpaceCompactItemContextType | null>;
11export declare const useCompactItemContext: (prefixCls: string, direction: DirectionType) => {
12 compactSize: SizeType;
13 compactDirection: "horizontal" | "vertical" | undefined;
14 compactItemClassnames: string;
15};
16export declare const NoCompactStyle: React.FC<React.PropsWithChildren<{}>>;
17export interface SpaceCompactProps extends React.HTMLAttributes<HTMLDivElement> {
18 prefixCls?: string;
19 size?: SizeType;
20 direction?: 'horizontal' | 'vertical';
21 block?: boolean;
22 rootClassName?: string;
23}
24declare const Compact: React.FC<SpaceCompactProps>;
25export default Compact;