File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ const Loading: React.FC<LoadingProps> = (props) => {
120120 let renderIndicator = themeMap [ theme ] ;
121121
122122 if ( indicator && typeof indicator !== 'boolean' ) {
123- renderIndicator = indicator as React . JSX . Element ;
123+ renderIndicator = indicator as React . ReactElement ;
124124 }
125125 return (
126126 < >
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Sticky from '../sticky';
55import Badge from '../badge' ;
66import { TdTabPanelProps , TdTabsProps } from './type' ;
77import TabPanel from './TabPanel' ;
8+ import type { TabPanelProps } from './TabPanel' ;
89import useConfig from '../hooks/useConfig' ;
910import { usePrefixClass } from '../hooks/useClass' ;
1011import useDefaultProps from '../hooks/useDefaultProps' ;
@@ -43,15 +44,15 @@ const Tabs: FC<TabsProps> = (props) => {
4344 [ size , tabsClass ] ,
4445 ) ;
4546
46- const itemProps = useMemo < Array < TdTabPanelProps > > ( ( ) => {
47+ const itemProps = useMemo < Array < TabPanelProps > > ( ( ) => {
4748 if ( list && list . length > 0 ) {
4849 return list ;
4950 }
5051
5152 const propsArr = [ ] ;
5253
53- React . Children . forEach ( children , ( child : React . JSX . Element ) => {
54- if ( child . type . displayName === TabPanel . displayName ) {
54+ React . Children . forEach ( children , ( child : React . ReactElement < TabPanelProps > ) => {
55+ if ( ( child . type as any ) . displayName === TabPanel . displayName ) {
5556 propsArr . push ( child . props ) ;
5657 }
5758 } ) ;
You can’t perform that action at this time.
0 commit comments