Remove @mdi/js as a dependency
This commit is contained in:
18
matrixgw_frontend/src/icons/AppIcon.tsx
Normal file
18
matrixgw_frontend/src/icons/AppIcon.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Icon } from "@mui/material";
|
||||
import { useActualColorMode } from "../widgets/dashboard/ThemeSwitcher";
|
||||
|
||||
export function AppIcon(p: { src: string; size?: string }): React.ReactElement {
|
||||
const { mode } = useActualColorMode();
|
||||
return (
|
||||
<Icon style={{ display: "inline-flex", width: p.size, height: p.size }}>
|
||||
<img
|
||||
style={{
|
||||
height: "100%",
|
||||
flex: 1,
|
||||
backgroundColor: mode === "dark" ? "white" : "black",
|
||||
mask: `url("${p.src}")`,
|
||||
}}
|
||||
/>
|
||||
</Icon>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user