-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
The class name prefix is currently hardcoded for the icon type. Being able to pass a custom class prefix would allow to use webfonts like @mdi/font or fontawesome, etc.
What does the proposed API look like?
Current code is in icon/index.js is:
const classString = classNames({
[`anticon`]: true,
[`anticon-${type}`]: !!type,
});
In order to have compatibility with all components using icons (button, etc) a simple synthax could be used like:
<icon type="custom mdi mdi-earth"> and in the code if type.startsWith('custom ') then use the provided custom type as classNames.