- Fork the repository from mt-web-icon
- git fetch and pull the latest version
- Go to https://icomoon.io/app/#/select
- Upload the latest
selection.jsonin theiconmoonfolder - In the iconmoon web app, upload the svg you want to add. Be sure to center it and name it properly.
- Generate the new web font by click
Generate Fontbutton at bottom right corner. - Download it
- Unzip it
- Copy the whole unzipped folder to update this repository,
make sure replace these folder & files
- replace the folder
/icomoonwith unzip folder - replace the folder
/fontswith unzip folder/fonts - replace the file
/css/style.csswith unzip file/style.css - replace the file
/style.csswith unzip file/style.css - replace the file
/selection.jsonwith unzip file/selection.json
- replace the folder
- In
package.jsonincrement the version - Run
yarn installandyarn buildto build the library - Push your branch to github and test in your project by using
"mt-web-icons": "github:moneytree/mt-web-icons.git#<your commit hash>". - Create a PR
- Set new release after merge
Run the following command before:
yarn buildimport React, { ReactNode } from 'react';
import Icon from 'mt-web-icons';
export default function IconAuto(): ReactNode {
return <Icon icon="auto" width={100} height={100} fill="#ffffff" />;
}import React, { ReactNode } from 'react';
// Imports from specific ESM module folder
import Icon from 'mt-web-icons/react/Icon/esm';
export default function Icon(): ReactNode {
return <Auto width={100} height={100} fill="#ffffff" />;
}import React, { ReactNode } from 'react';
import Icon from 'mt-web-icons';
export default function IconAuto(): ReactNode {
return <Icon icon="Auto" placeholder={null} fallback={<div />} />;
}import React, { ReactNode } from 'react';
import { Auto } from 'mt-web-icons';
export default function Icon(): ReactNode {
return <Auto width={100} height={100} fill="#ffffff" />;
}