Skip to content

Commit

Permalink
🏷️ fix: 修正 theme props 类型定义失效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jan 9, 2023
1 parent e15668a commit 2c3749c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/containers/ThemeProvider/type.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { GetAntdThemeConfig, GetCustomStylish, GetCustomToken } from '@/types';
import { GetCustomStylish, GetCustomToken, ThemeAppearance } from '@/types';
import { ThemeConfig } from 'antd/es/config-provider/context';
import { MessageInstance } from 'antd/es/message/interface';
import { ModalStaticFunctions } from 'antd/es/modal/confirm';
import { NotificationInstance } from 'antd/es/notification/interface';
import { ReactNode } from 'react';

export interface GetAntdTheme {
(appearance: ThemeAppearance): ThemeConfig | undefined;
}

export interface ThemeProviderProps<T, S = Record<string, string>> {
children: ReactNode;
/**
Expand All @@ -18,7 +22,7 @@ export interface ThemeProviderProps<T, S = Record<string, string>> {
/**
* 直接传入 antd 主题,或者传入一个函数,根据当前的主题模式返回对应的主题
*/
theme?: ThemeConfig | GetAntdThemeConfig;
theme?: ThemeConfig | GetAntdTheme;
prefixCls?: string;
/**
* 从 ThemeProvider 中获取静态方法的实例对象
Expand Down

0 comments on commit 2c3749c

Please sign in to comment.