Closed EmreDereli closed 1 year ago
You can set the iconSet
at the component define stage according to a certain situation. Or it is possible to add a different iconSet
while you are going to show the Icon
.
import IcoMoon from "react-icomoon";
import iconSet from "./selection.json";
import otherIconSet from "./other-selection.json";
const Icon = ({ other, ...props }) => (
<IcoMoon iconSet={other ? otherIconSet : iconSet} {...props} />
);
export default Icon;
or
<Icon iconSet={otherIconSet} name="camera" size={20} />
Examples and methods can be multiplied. This package offers unlimited freedom in this regard.
Thanks for this awesome package!! I have a different folder structure and I want to set iconSet programmatically. Is there a way to do it?