From f9301952f288a1199e220f67c14a9e5837b1c5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8F=8E=EF=B8=8F=20Yumo?= Date: Fri, 6 Dec 2024 01:30:34 +0800 Subject: [PATCH] refactor: use defaultIconPrefixCls instead of string --- components/theme/util/useResetIconStyle.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/theme/util/useResetIconStyle.ts b/components/theme/util/useResetIconStyle.ts index 56eae028cf..237f62a41a 100644 --- a/components/theme/util/useResetIconStyle.ts +++ b/components/theme/util/useResetIconStyle.ts @@ -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`]: {