File tree Expand file tree Collapse file tree 3 files changed +22
-19
lines changed Expand file tree Collapse file tree 3 files changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
6
6
import Item from './Item' ;
7
7
import useEffectState , { useBatcher } from './hooks/useEffectState' ;
8
8
import type { ComponentType } from './RawItem' ;
9
- import RawItem , { OverflowContext } from './RawItem' ;
9
+ import RawItem from './RawItem' ;
10
+ import { OverflowContext } from './context' ;
10
11
11
12
const RESPONSIVE = 'responsive' as const ;
12
13
const INVALIDATE = 'invalidate' as const ;
13
14
14
- export { OverflowContext } from './RawItem ' ;
15
+ export { OverflowContext } from './context ' ;
15
16
16
17
export type { ComponentType } from './RawItem' ;
17
18
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 './context' ;
4
5
5
6
export type ComponentType =
6
7
| React . ComponentType < any >
7
8
| React . ForwardRefExoticComponent < any >
8
9
| React . FC < any >
9
10
| keyof React . ReactHTML ;
10
11
11
- export const OverflowContext = React . createContext < {
12
- prefixCls : string ;
13
- responsive : boolean ;
14
- order : number ;
15
- registerSize : ( key : React . Key , width : number | null ) => void ;
16
- display : boolean ;
17
-
18
- invalidate : boolean ;
19
-
20
- // Item Usage
21
- item ?: any ;
22
- itemKey ?: React . Key ;
23
-
24
- // Rest Usage
25
- className ?: string ;
26
- } > ( null ) ;
27
-
28
12
export interface RawItemProps extends React . HTMLAttributes < any > {
29
13
component ?: ComponentType ;
30
14
children ?: React . ReactNode ;
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