Templarian / MaterialDesign-React

Dist for Material Design Icons React Component for JS/TypeScript
https://materialdesignicons.com
MIT License
139 stars 20 forks source link

[Feature request] Add default class attribute to all svg elements #43

Closed AmirHosseinKarimi closed 4 years ago

AmirHosseinKarimi commented 4 years ago

Like as other library the element should have a class to identify, Like as Font Awesome which use fa, and also should every specific element has their own icon name as a class, Like as fa-search and the final output of svg should be like this: <svg class="mdi mdi-search [...Rest]">... This is good idea to identify all MDI icons and also identify an specific icon.

This is a feature request and do not take personal my used words (like should), My English is not good to use best words in sentence.

mririgoyen commented 4 years ago

Just add the class name to the wrapper.

<Icon className='my-class-name' path={...} size={1} />

I don't see a need for this personally.

Templarian commented 4 years ago

Closing this as it's not possible to know the icon name (we don't actually store it for JS/TS usage). Reference @goyney's suggestion to do this.