You have Node installed at v10.0.0+ and Yarn at v1.2.0+. You are familiar with Git.
- 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.json
in theiconmoon
folder - In the iconmoon web app, just upload whatever svg you want to add. Be sure to center it and name it properly.
- Generate the new web font by click
Generate Font
button 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
/icomoon
with unzip folder - replace the folder
/fonts
with unzip folder/fonts
- replace the file
/css/style.css
with unzip file/style.css
- replace the file
/style.css
with unzip file/style.css
- replace the file
/selection.json
with unzip file/selection.json
- replace the folder
- In
package.json
increment the version - Follow the steps below to test locally
- Create a PR
- Set new release after merge
- Under the mt-web-icon run
yarn
yarn build
- Under your project, install the local mt-web-icon package
rm -rf ./node_modules/mt-web-icons
yarn add file:../mt-web-icons
(path the folder mt-web-icons)
- Test it
Run the following command before:
yarn build
import 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" />;
}