|
@ -4,6 +4,7 @@ import { useStyleRegister } from '@ant-design/cssinjs'; |
|
|
import { useContext } from 'react'; |
|
|
import { useContext } from 'react'; |
|
|
import { ConfigContext } from '../../config-provider/context'; |
|
|
import { ConfigContext } from '../../config-provider/context'; |
|
|
import { genCommonStyle, genLinkStyle } from '../../style'; |
|
|
import { genCommonStyle, genLinkStyle } from '../../style'; |
|
|
|
|
|
import { useResetIconStyle } from '../../config-provider/style'; |
|
|
import type { ComponentTokenMap, GlobalToken } from '../interface'; |
|
|
import type { ComponentTokenMap, GlobalToken } from '../interface'; |
|
|
import type { UseComponentStyleResult } from '../internal'; |
|
|
import type { UseComponentStyleResult } from '../internal'; |
|
|
import { mergeToken, statisticToken, useToken } from '../internal'; |
|
|
import { mergeToken, statisticToken, useToken } from '../internal'; |
|
@ -66,6 +67,9 @@ export default function genComponentStyleHook<ComponentName extends OverrideComp |
|
|
}, |
|
|
}, |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
// Generate style for icons
|
|
|
|
|
|
useResetIconStyle(iconPrefixCls); |
|
|
|
|
|
|
|
|
return [ |
|
|
return [ |
|
|
useStyleRegister({ ...sharedConfig, path: [component, prefixCls, iconPrefixCls] }, () => { |
|
|
useStyleRegister({ ...sharedConfig, path: [component, prefixCls, iconPrefixCls] }, () => { |
|
|
const { token: proxyToken, flush } = statisticToken(token); |
|
|
const { token: proxyToken, flush } = statisticToken(token); |
|
|