Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: font-family for components #39806

Merged
merged 3 commits into from Dec 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion components/style/index.tsx
Expand Up @@ -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': {
Expand Down