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 1
1
import * as React from 'react' ;
2
2
import classNames from 'classnames' ;
3
3
import ResizeObserver from 'rc-resize-observer' ;
4
- import type { ComponentType } from './Overflow ' ;
4
+ import type { ComponentType } from './RawItem ' ;
5
5
6
6
// Use shared variable to save bundle size
7
7
const UNDEFINED = undefined ;
Original file line number Diff line number Diff line change @@ -5,33 +5,16 @@ import ResizeObserver from 'rc-resize-observer';
5
5
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect' ;
6
6
import Item from './Item' ;
7
7
import useEffectState , { useBatcher } from './hooks/useEffectState' ;
8
+ import type { ComponentType } from './RawItem' ;
8
9
import 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' ;
26
11
27
12
const RESPONSIVE = 'responsive' as const ;
28
13
const INVALIDATE = 'invalidate' as const ;
29
14
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' ;
35
18
36
19
export interface OverflowProps < ItemType > extends React . HTMLAttributes < any > {
37
20
prefixCls ?: string ;
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import classNames from 'classnames' ;
3
3
import 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 ;
6
11
7
12
export interface RawItemProps extends React . HTMLAttributes < any > {
8
13
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