Skip to content

Commit

Permalink
simplify type
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Sep 22, 2023
1 parent 3cd0107 commit d374c52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mui-joy/src/utils/GenerateCssVarsType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
* '--Button-size'?: string | number;
* }
*/
export type GenerateCssVarsType<CssVars extends object> = {
[Key in keyof CssVars as CssVars[Key] extends string ? CssVars[Key] : never]?: string | number;
export type GenerateCssVarsType<CssVars extends Record<string, string>> = {
[Key in keyof CssVars as CssVars[Key]]?: string | number;
};

0 comments on commit d374c52

Please sign in to comment.