1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

feat: dynamic icons by adding material symbols font (#5008)

https://linear.app/unleash/issue/2-1502/add-support-for-custom-dynamic-icons-mui-icon-component

Adds support for custom dynamic icons by adding the [Material Symbols
Outlined font](https://fonts.google.com/icons) and setting the MUI Icon
component base class. See:
https://mui.com/material-ui/icons/#icon-font-icons

Message banner use case: This will not only enable us to set custom
icons for external message banners, but will also let users configure
their desired icon from the set of options in the font.
This commit is contained in:
Nuno Góis 2023-10-12 11:22:23 +01:00 committed by GitHub
parent 2059706e77
commit 2ab2aa1f6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -16,6 +16,10 @@
href="https://fonts.googleapis.com/css2?family=Sen:wght@400;700;800&display=swap" href="https://fonts.googleapis.com/css2?family=Sen:wght@400;700;800&display=swap"
rel="stylesheet" rel="stylesheet"
/> />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"
/>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -617,5 +617,11 @@ export default createTheme({
}), }),
}, },
}, },
MuiIcon: {
defaultProps: {
baseClassName: 'material-symbols-outlined',
},
},
}, },
}); });

View File

@ -529,5 +529,11 @@ export default createTheme({
}), }),
}, },
}, },
MuiIcon: {
defaultProps: {
baseClassName: 'material-symbols-outlined',
},
},
}, },
}); });