A package containing icons used in NDLA frontends
yarn add @ndla/icons
npm install @ndla/icons --save
import { VoicePrintLine } from "@ndla/icons/common";
import { CameraFill } from "@ndla/icons/editor";
const IconList = () => (
<ul>
<li>
<VoicePrintLine /> Audio icon
</li>
<li>
<CameraFill /> Camera icon
</li>
</ul>
);
or
import { VoicePrintLine } from "@ndla/icons/lib/common/VoicePrintLine";
<VoicePrintLine />;
- common
- license
- editor
- contentType
TLDR: Change/Add/Remove svg file(s). Run node scripts/createTsIconComponents.mjs
. Commit.
- Add svg file to an appropiate folder in ndla-icons/svg.
- Ensure that
data-license
anddata-source
attributes are on the<svg>
element. - Run
node scripts/createTsIconComponents.mjs
from root folder. - Commit changes.
- Edit existing svg file.
- Run
node scripts/createTsIconComponents.mjs
from root folder. - Commit changes.
- Delete svg file.
- Run
node scripts/createTsIconComponents.mjs
from root folder. - Commit changes.
- Do changes.
- Run
node scripts/createTsIconComponents.mjs
from root folder. - Update files array in packages.json.