File tree Expand file tree Collapse file tree 4 files changed +31
-25
lines changed Expand file tree Collapse file tree 4 files changed +31
-25
lines changed Original file line number Diff line number Diff line change 11import * as React from 'react' ;
22import classNames from 'classnames' ;
33import ResizeObserver from 'rc-resize-observer' ;
4- import type { ComponentType } from './Overflow ' ;
4+ import type { ComponentType } from './RawItem ' ;
55
66// Use shared variable to save bundle size
77const UNDEFINED = undefined ;
Original file line number Diff line number Diff line change @@ -5,33 +5,16 @@ import ResizeObserver from 'rc-resize-observer';
55import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect' ;
66import Item from './Item' ;
77import useEffectState , { useBatcher } from './hooks/useEffectState' ;
8+ import type { ComponentType } from './RawItem' ;
89import RawItem from './RawItem' ;
9-
10- export const OverflowContext = React . createContext < {
11- prefixCls : string ;
12- responsive : boolean ;
13- order : number ;
14- registerSize : ( key : React . Key , width : number | null ) => void ;
15- display : boolean ;
16-
17- invalidate : boolean ;
18-
19- // Item Usage
20- item ?: any ;
21- itemKey ?: React . Key ;
22-
23- // Rest Usage
24- className ?: string ;
25- } > ( null ) ;
10+ import { OverflowContext } from './context' ;
2611
2712const RESPONSIVE = 'responsive' as const ;
2813const INVALIDATE = 'invalidate' as const ;
2914
30- export type ComponentType =
31- | React . ComponentType < any >
32- | React . ForwardRefExoticComponent < any >
33- | React . FC < any >
34- | keyof React . ReactHTML ;
15+ export { OverflowContext } from './context' ;
16+
17+ export type { ComponentType } from './RawItem' ;
3518
3619export interface OverflowProps < ItemType > extends React . HTMLAttributes < any > {
3720 prefixCls ?: string ;
Original file line number Diff line number Diff line change 11import * as React from 'react' ;
22import classNames from 'classnames' ;
33import Item from './Item' ;
4- import { OverflowContext } from './Overflow' ;
5- import type { ComponentType } from './Overflow' ;
4+ import { OverflowContext } from './context' ;
5+
6+ export type ComponentType =
7+ | React . ComponentType < any >
8+ | React . ForwardRefExoticComponent < any >
9+ | React . FC < any >
10+ | keyof React . ReactHTML ;
611
712export interface RawItemProps extends React . HTMLAttributes < any > {
813 component ?: ComponentType ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ export const OverflowContext = React . createContext < {
4+ prefixCls : string ;
5+ responsive : boolean ;
6+ order : number ;
7+ registerSize : ( key : React . Key , width : number | null ) => void ;
8+ display : boolean ;
9+
10+ invalidate : boolean ;
11+
12+ // Item Usage
13+ item ?: any ;
14+ itemKey ?: React . Key ;
15+
16+ // Rest Usage
17+ className ?: string ;
18+ } > ( null ) ;
You can’t perform that action at this time.
0 commit comments