refactor: use defaultIconPrefixCls instead of string

This commit is contained in:
🏎️ Yumo 2024-12-06 01:30:34 +08:00
parent 8a82e55197
commit f9301952f2

View File

@ -1,11 +1,12 @@
import { useStyleRegister } from '@ant-design/cssinjs';
import type { CSSObject } from '@ant-design/cssinjs';
import { defaultIconPrefixCls } from '../../config-provider';
import type { CSPConfig } from '../../config-provider';
import { resetIcon } from '../../style';
import useToken from '../useToken';
export const genIconStyle = (iconPrefixCls = 'anticon'): CSSObject => ({
export const genIconStyle = (iconPrefixCls = defaultIconPrefixCls): CSSObject => ({
[`.${iconPrefixCls}`]: {
...resetIcon(),
[`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {