Skip to content

Commit

Permalink
🏷️ fix: 修正 ThemeProvider 子组件类型定义问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Feb 17, 2023
1 parent 1cb295c commit 3066b81
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/factories/createThemeProvider/TokenContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ import { serializeCSS } from '@/core';
import { useAntdTheme, useThemeMode } from '@/hooks';
import { Theme } from '@/types';

import type { ThemeProviderProps } from './type';
import type { StyledThemeProvider, ThemeProviderProps } from './type';

type TokenContainerProps<T, S = Record<string, string>> = Pick<
ThemeProviderProps<T, S>,
'children' | 'customToken' | 'customStylish' | 'prefixCls' | 'StyledThemeProvider'
>;
interface TokenContainerProps<T, S = Record<string, string>>
extends Pick<
ThemeProviderProps<T, S>,
'children' | 'customToken' | 'customStylish' | 'prefixCls'
> {
StyledThemeProvider: StyledThemeProvider;
}

const TokenContainer: <T, S>(props: TokenContainerProps<T, S>) => ReactElement | null = ({
children,
Expand Down

0 comments on commit 3066b81

Please sign in to comment.