@ndla/icons
TypeScript icon, indicating that this package has built-in type declarations

8.0.50-alpha.0 • Public • Published

@ndla/icons

A package containing icons used in NDLA frontends

Installation

yarn add @ndla/icons
npm install @ndla/icons --save

Usage

import { VoiceprintLine, CameraFill } from "@ndla/icons";

const IconList = () => (
  <ul>
    <li>
      <VoiceprintLine /> Audio icon
    </li>
    <li>
      <CameraFill /> Camera icon
    </li>
  </ul>
);

Icons are currently grouped into four folders

  • common
  • license
  • editor
  • contentType

Development

TLDR: Change/Add/Remove svg file(s). Run node scripts/createTsIconComponents.mjs. Commit.

Add new svg file:

  1. Add svg file to an appropiate folder in icons/svg.
  2. Ensure that data-license and data-source attributes are on the <svg> element.
  3. Run node scripts/createTsIconComponents.mjs from root folder.
  4. Commit changes.

Edit svg file:

  1. Edit existing svg file.
  2. Run node scripts/createTsIconComponents.mjs from root folder.
  3. Commit changes.

Delete svg file:

  1. Delete svg file.
  2. Run node scripts/createTsIconComponents.mjs from root folder.
  3. Commit changes.

Rename or add new folders

  1. Do changes.
  2. Run node scripts/createTsIconComponents.mjs from root folder.
  3. Update files array in packages.json.

Readme

Keywords

Package Sidebar

Install

npm i @ndla/icons

Weekly Downloads

443

Version

8.0.50-alpha.0

License

GPL-3.0

Unpacked Size

555 kB

Total Files

653

Last publish

Collaborators

  • ndlauser
  • jonasc-knowit
  • gunnarvelle
  • jnatten
  • kronen_ki
  • katrinewi
  • rauboti
  • mapoken