mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-29 18:50:00 +08:00
fix: font-family for components (#39806)
* fix: font-family for components * chore: code clean
This commit is contained in:
parent
663d1454f2
commit
c1390b20a9
@ -103,11 +103,15 @@ export const genLinkStyle = (token: DerivativeToken): CSSObject => ({
|
||||
},
|
||||
});
|
||||
|
||||
export const genCommonStyle = (componentPrefixCls: string): CSSObject => {
|
||||
export const genCommonStyle = (token: DerivativeToken, componentPrefixCls: string): CSSObject => {
|
||||
const { fontFamily, fontSize } = token;
|
||||
|
||||
const rootPrefixSelector = `[class^="${componentPrefixCls}"], [class*=" ${componentPrefixCls}"]`;
|
||||
|
||||
return {
|
||||
[rootPrefixSelector]: {
|
||||
fontFamily,
|
||||
fontSize,
|
||||
boxSizing: 'border-box',
|
||||
|
||||
'&::before, &::after': {
|
||||
|
@ -87,7 +87,7 @@ export default function genComponentStyleHook<ComponentName extends OverrideComp
|
||||
overrideComponentToken: token[component],
|
||||
});
|
||||
flush(component, mergedComponentToken);
|
||||
return [genCommonStyle(prefixCls), styleInterpolation];
|
||||
return [genCommonStyle(token, prefixCls), styleInterpolation];
|
||||
},
|
||||
),
|
||||
hashId,
|
||||
|
Loading…
Reference in New Issue
Block a user