Support `@mdi/react` and tweak `<Icon />`
Created by: umpox
Description
This PR:
- Adds support for
@mdi/react
and@mdi/js
as an preferred alternative tomdi-react
. - Splits
<Icon />
into<IconStyles />
and<Icon />
-
<IconStyles />
: Purely for alternative elements that needed theicon-inline
class previously (e.g.<div className="icon-inline" />
is still quite common) -
<Icon />
: Purely for SVG icons, either added by ourselves, or through themdi-react
|@mdi/react
packages.
-
@mdi/react
vs mdi-react
Problem: mdi-react
doesn't allow us to inject important elements that are required for accessibility (The
@mdi/react
.
The new library also:
- Supports all the same icons
- Has similar/slightly more usage according to NPM
- Is actively maintained by the person who also runs materialdesignicons (which both libraries source from)
Test plan
App preview:
Check out the client app preview documentation to learn more.