Skip to content

Commit

Permalink
fix(Autocomplete): internal input cannot apply fontFamily
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuiai01 committed Oct 7, 2023
1 parent fc2b4af commit df625e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/select/style/single.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {

// ========================= Selector =========================
[`${componentCls}-selector`]: {
...resetComponent(token),
...resetComponent(token, true),

display: 'flex',
borderRadius,
Expand Down
7 changes: 5 additions & 2 deletions components/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export const textEllipsis: CSSObject = {
textOverflow: 'ellipsis',
};

export const resetComponent = (token: DerivativeToken): CSSObject => ({
export const resetComponent = (
token: DerivativeToken,
needInheritFontFamily = false,
): CSSObject => ({
boxSizing: 'border-box',
margin: 0,
padding: 0,
Expand All @@ -21,7 +24,7 @@ export const resetComponent = (token: DerivativeToken): CSSObject => ({
lineHeight: token.lineHeight,
listStyle: 'none',
// font-feature-settings: @font-feature-settings-base;
fontFamily: token.fontFamily,
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily,
});

export const resetIcon = (): CSSObject => ({
Expand Down

0 comments on commit df625e2

Please sign in to comment.