2.0.1 • Published 1 month ago

@sikt/sds-icons v2.0.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
1 month ago

@sikt/sds-icons

Sikt designsystem uses Phosphor Icons.

Consume

npm i -s @sikt/sds-icons

React

import { <icon-name>Icon } from "@sikt/sds-icons";
import "@sikt/sds-icons/dist/index.css";

<<IconName>Icon />;

Stylesheets & custom markup

Import stylesheet:

@import url("@sikt/sds-icons");

Create custom markup:

<img
  class="sds-icon"
  aria-hidden="true"
  src="@sikt/sds-icons/dist/assets/<icon-name>.svg"
/>

Or use sprite:

<svg class="sds-icon" aria-hidden="true">
  <use href="@sikt/sds-icons/dist/sds-icons.svg#<icon-name>"></use>
</svg>

Contribute

Add new icons by adding name to icons.config.js.