mirror of https://github.com/openedx/paragon.git
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| es5 | ||
| jsx | ||
| svg | ||
| .babelrc.json | ||
| .svgrrc.js | ||
| README.md | ||
| copy-brand-icons.js | ||
| copy-mui-icons.js | ||
| index.d.ts | ||
| index.js | ||
| index.mjs | ||
| package.json | ||
README.md
Paragon Icons
This module contains icons for use with the Paragon <Icon /> component. This module generates source .svg icons into jsx and es5 React components.
To add a new icon:
- Install dependencies
npm install
-
Add the desired
.svgicon file to the svg folder. It should be designed for display at 24px by 24px. -
Generate the React components
npm run build
Note that most of the icons are taken from MUI icons, this is achieved through copy-mui-icons.js script located in this directory which is part of npm run build command. There are a couple of things to keep in mind:
- the script currently does not override existing files, so if you need updated version of the icon you will need to update it manually (copy the icon to
svgdirectory and run build command) - if new version of the
material-iconspackage is published with new icons, the version needs to be updated inpackage.jsonbefore running the build command to include new icons