Skip to content

Commit

Permalink
feat: dynamic icons by adding material symbols font (#5008)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nunogois committed Oct 12, 2023
1 parent 2059706 commit 2ab2aa1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/index.html
Expand Up @@ -16,6 +16,10 @@
href="https://fonts.googleapis.com/css2?family=Sen:wght@400;700;800&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"
/>
</head>
<body>
<div id="app"></div>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/themes/dark-theme.ts
Expand Up @@ -617,5 +617,11 @@ export default createTheme({
}),
},
},

MuiIcon: {
defaultProps: {
baseClassName: 'material-symbols-outlined',
},
},
},
});
6 changes: 6 additions & 0 deletions frontend/src/themes/theme.ts
Expand Up @@ -529,5 +529,11 @@ export default createTheme({
}),
},
},

MuiIcon: {
defaultProps: {
baseClassName: 'material-symbols-outlined',
},
},
},
});

0 comments on commit 2ab2aa1

Please sign in to comment.