mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
chore: improvement type
This commit is contained in:
parent
f1a9aa59b2
commit
159e3dc754
@ -2,7 +2,7 @@ import useMergedState from 'rc-util/lib/hooks/useMergedState';
|
||||
import * as React from 'react';
|
||||
import ConfigProvider, { ConfigContext } from '../config-provider';
|
||||
|
||||
export function withPureRenderTheme(Component: any) {
|
||||
export function withPureRenderTheme<T extends React.FC>(Component: T): T {
|
||||
return function PureRenderThemeComponent(props: any) {
|
||||
return (
|
||||
<ConfigProvider
|
||||
@ -16,7 +16,7 @@ export function withPureRenderTheme(Component: any) {
|
||||
<Component {...props} />
|
||||
</ConfigProvider>
|
||||
);
|
||||
};
|
||||
} as T;
|
||||
}
|
||||
|
||||
export interface BaseProps {
|
||||
|
Loading…
Reference in New Issue
Block a user