Skip to content

Commit

Permalink
fix: generateNeutralColorPalettes type not match
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jan 7, 2025
1 parent 15b5831 commit b4d76fd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export interface ValidateFieldsOptions {
// function create
export interface WrappedFormUtils<V = any> {
/** 获取一组输入控件的值,如不传入参数,则获取全部组件的值 */
getFieldsValue(fieldNames?: string[]): { [field: string]: any };
getFieldsValue(fieldNames?: string[]): Record<string, any>;
/** 获取一个输入控件的值 */
getFieldValue(fieldName: string): any;
/** 设置一组输入控件的值 */
Expand Down
4 changes: 1 addition & 3 deletions src/form/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ interface FORWARD_REF_STATICS {

type NonReactStatics<
S extends React.ComponentType<any>,
C extends {
[key: string]: true;
} = {}
C extends Record<string, true> = {}
> = {
[key in Exclude<
keyof S,
Expand Down
4 changes: 1 addition & 3 deletions src/icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ export interface IconComponent<P> extends React.FC<P> {
setTwoToneColor: typeof setTwoToneColor;
}

const iconsMap: {
[key: string]: any;
} = allIcons;
const iconsMap: Record<string, any> = allIcons;

const LegacyTypeIcon: React.FC<LegacyTypeIconProps> = props => {
const { type, theme } = props;
Expand Down
4 changes: 4 additions & 0 deletions src/theme/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const generateNeutralColorPalettes: GenerateNeutralColorMap = (
colorBorder: getSolidColor(colorBgBase, 26),
colorBorderSecondary: getSolidColor(colorBgBase, 19),
colorSplit: getAlphaColor(colorTextBase, 0.12),

colorBgSolid: getAlphaColor(colorTextBase, 0.95),
colorBgSolidHover: getAlphaColor(colorTextBase, 1),
colorBgSolidActive: getAlphaColor(colorTextBase, 0.9),
};
};

Expand Down
4 changes: 4 additions & 0 deletions src/theme/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const generateNeutralColorPalettes: GenerateNeutralColorMap = (
colorBorder: getSolidColor(colorBgBase, 15),
colorBorderSecondary: getSolidColor(colorBgBase, 6),
colorSplit: getAlphaColor(colorTextBase, 0.06),

colorBgSolid: getAlphaColor(colorTextBase, 1),
colorBgSolidHover: getAlphaColor(colorTextBase, 0.75),
colorBgSolidActive: getAlphaColor(colorTextBase, 0.95),
};
};

Expand Down

0 comments on commit b4d76fd

Please sign in to comment.