Merge pull request #18334 from backstage/philipph/mui5-icon-types

Change `IconComponent` type to be compatible with MUI 5
This commit is contained in:
Fredrik Adelöw
2023-06-29 21:40:22 +02:00
committed by GitHub
3 changed files with 24 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-plugin-api': patch
---
Change `IconComponent` type to be compatible with Material UI v5 icons.
+8 -3
View File
@@ -502,9 +502,14 @@ export const googleAuthApiRef: ApiRef<
>;
// @public
export type IconComponent = ComponentType<{
fontSize?: 'default' | 'small' | 'large';
}>;
export type IconComponent = ComponentType<
| {
fontSize?: 'large' | 'small' | 'default';
}
| {
fontSize?: 'medium' | 'large' | 'small';
}
>;
// @public
export type IdentityApi = {
+11 -3
View File
@@ -32,6 +32,14 @@ import { ComponentType } from 'react';
*
* @public
*/
export type IconComponent = ComponentType<{
fontSize?: 'default' | 'small' | 'large';
}>;
export type IconComponent = ComponentType<
/* MUI v4 */
| {
fontSize?: 'large' | 'small' | 'default';
}
/* MUI v5: https://mui.com/material-ui/migration/v5-component-changes/#icon */
| {
fontSize?: 'medium' | 'large' | 'small';
}
>;