mlaursen/react-md

@react-md/material-icons incomplete

Opened this issue · 3 comments

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.

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

  • updated my icon generator script 00b178d
  • generated all the icons d17017b

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.

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.

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.