fortunar / react-sidemenu

React sidemenu component
57 stars 14 forks source link

Allow non font awesome icons? #4

Closed elgs closed 7 years ago

elgs commented 7 years ago

I'm hoping to use some non font awesome icons. Looking into the source code, I found some line like this:

<i className={`fa ${item.icon} item-icon`} />

I am wondering if it is better to remove the fa from the library code so that it will not be limited to fa icons. From the end user's perspective, if we want to use fa icons, we simply add fa.

wamujlb commented 7 years ago

It will be awesome. Nice idea.

fortunar commented 7 years ago

This can already be achieved if you override 'renderMenuItemContent' method.

OleksandrBohuslavskyi commented 7 years ago

@fortunar handleRenderMenuItemContent() method actually. And also renderChevron() method, because it's also uses "font awesome". And need to do it in two classes: SideMenu and Item

screen