Browse Source

chore: update

wuxh/fix-41197
wuxh 2 years ago
parent
commit
3146cb49a3
No known key found for this signature in database GPG Key ID: 464F03149513C20C
  1. 2
      components/config-provider/index.tsx
  2. 2
      components/config-provider/style/index.ts
  3. 1
      components/theme/util/genComponentStyleHook.ts

2
components/config-provider/index.tsx

@ -206,7 +206,7 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = (props) => {
const shouldWrapSSR = iconPrefixCls !== parentContext.iconPrefixCls;
const csp = customCsp || parentContext.csp;
const wrapSSR = useResetIconStyle(iconPrefixCls);
const wrapSSR = useResetIconStyle(iconPrefixCls, csp);
const mergedTheme = useTheme(theme, parentContext.theme);

2
components/config-provider/style/index.ts

@ -4,7 +4,7 @@ import type { CSPConfig } from '..';
import { resetIcon } from '../../style';
import { useToken } from '../../theme/internal';
export const useResetIconStyle = (iconPrefixCls: string) => {
export const useResetIconStyle = (iconPrefixCls: string, csp?: CSPConfig) => {
const [theme, token] = useToken();
// Generate style for icons

1
components/theme/util/genComponentStyleHook.ts

@ -3,6 +3,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs';
import { useStyleRegister } from '@ant-design/cssinjs';
import { useContext } from 'react';
import { ConfigContext } from '../../config-provider/context';
import { genCommonStyle, genLinkStyle } from '../../style';
import { useResetIconStyle } from '../../config-provider/style';
import type { ComponentTokenMap, GlobalToken } from '../interface';
import type { UseComponentStyleResult } from '../internal';

Loading…
Cancel
Save