mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 19:39:51 +08:00
chore: fix circular dependency
This commit is contained in:
parent
74729a6998
commit
807cca1997
@ -1,6 +1,7 @@
|
||||
import { unit } from '@ant-design/cssinjs';
|
||||
import type { CSSObject } from '@ant-design/cssinjs';
|
||||
import { defaultIconPrefixCls } from '../config-provider';
|
||||
|
||||
import type { CSSObject } from '@ant-design/cssinjs';
|
||||
import type { AliasToken } from '../theme/internal';
|
||||
|
||||
export const textEllipsis: CSSObject = {
|
||||
@ -144,6 +145,15 @@ export const genFocusStyle = (token: AliasToken): CSSObject => ({
|
||||
},
|
||||
});
|
||||
|
||||
export const genIconStyle = (iconPrefixCls = defaultIconPrefixCls): CSSObject => ({
|
||||
[`.${iconPrefixCls}`]: {
|
||||
...resetIcon(),
|
||||
[`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {
|
||||
display: 'block',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const operationUnit = (token: AliasToken): CSSObject => ({
|
||||
// FIXME: This use link but is a operation unit. Seems should be a colorPrimary.
|
||||
// And Typography use this to generate link style which should not do this.
|
||||
|
@ -3,10 +3,9 @@ import { genStyleUtils } from '@ant-design/cssinjs-utils';
|
||||
import type { GetCompUnitless } from '@ant-design/cssinjs-utils/es/util/genStyleUtils';
|
||||
|
||||
import { ConfigContext } from '../../config-provider/context';
|
||||
import { genCommonStyle, genLinkStyle } from '../../style';
|
||||
import { genCommonStyle, genLinkStyle, genIconStyle } from '../../style';
|
||||
import type { AliasToken, ComponentTokenMap, SeedToken } from '../interface';
|
||||
import useLocalToken, { unitless } from '../useToken';
|
||||
import { genIconStyle } from './useResetIconStyle';
|
||||
|
||||
export const { genStyleHooks, genComponentStyleHook, genSubStyleComponent } = genStyleUtils<
|
||||
ComponentTokenMap,
|
||||
|
@ -1,20 +1,9 @@
|
||||
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 { genIconStyle } from '../../style';
|
||||
import useToken from '../useToken';
|
||||
|
||||
export const genIconStyle = (iconPrefixCls = defaultIconPrefixCls): CSSObject => ({
|
||||
[`.${iconPrefixCls}`]: {
|
||||
...resetIcon(),
|
||||
[`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {
|
||||
display: 'block',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const useResetIconStyle = (iconPrefixCls: string, csp?: CSPConfig) => {
|
||||
const [theme, token] = useToken();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user