mlaursen / react-md

React material design - An accessible React component library built from the Material Design guidelines in Sass
https://react-md.dev
MIT License
2.34k stars 303 forks source link

@react-md/material-icons incomplete #1021

Open Gaibhne opened 3 years ago

Gaibhne commented 3 years ago

Describe the bug The list of classes generated for the @react-md/material-icons package is incomplete and is missing various icons.

To Reproduce Steps to reproduce the behavior:

  1. npm install --save @react-md/material-icons @react-md/icon
  2. Attempt to import for example MenuOpenSVGIcon (MD icon 'e5d2')
  3. Error output: WARNING in ./src/components/Whatever.jsx 136:29-44 - "export 'MenuOpenSVGIcon' was not found in '@react-md/material-icons'

Expected behavior Since the classes are auto generated and there is no way to use icon codes like e5d2 directly, there should be classes for all icons.

mlaursen commented 3 years ago

This one's going to be a bit tricky to implement. I have a feature/material-icons branch that:

Unfortunately, there are around 6800 icons now provided by the material icons library so now my computer runs out of memory if trying to typecheck or compile. Something I could try is to just make my icon component generator a public package and users can use it to generate the icons needed for their project.

Gaibhne commented 3 years ago

That does sound bad. I'm not entirely clear on the advantage of the concrete icon classes over the generic classes with the item name as a parameter, so I'm not sure how necessary those classes really are. An icon generator would definitely be a welcome addition/release to get around the current issue.

mlaursen commented 6 months ago

I'll close this with the v6 release, but there's some info here about how it'll be added. The docs will also include an example script for generating icon components.