npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@danske/sapphire-icons

v2.1.2

Published

Icons of the Sapphire Design System from Danske Bank A/S

Downloads

62

Readme

@danske/sapphire-icons

Sapphire package for icons
You can use raw svg icons from /svg folder, or use one of the other available formats:

  • ./react: SVG icons exported as React components

    import { CheckMarkSmall } from '@danske/sapphire-icons/react';
    const icon = <CheckMarkSmall />;

    Note You need to install the react peerDependency yourself

    It's also possible to import icons from their direct paths:

    import CheckMarkSmall from '@danske/sapphire-icons/react/CheckMarkSmall';

    This might improve build times a bit.
    And if you for some reason have issues with tree-shaking (which should work out of the box for build tools like Webpack and Vite), you can import directly like this to just avoid tree-shaking.

  • ./js: icons exported as JavaScript objects

    import { checkMarkSmall } from '@danske/sapphire-icons/js';
    console.log(checkMarkSmall.data); // svg content of the icon
  • ./font: a ttf font with all the icons and a codepoints.js (with types) which gives you a way to refer to each character in the font (icon) by name

    // this is an example from a react-native codebase // (assuming `@danske/sapphire-icons/build/font/icons.ttf` was previously linked)
    // https://gitlab.com/db-mobile-banking/sapphire/-/blob/master/src/Icon/Icon.tsx
    
    import { createIconSet } from 'react-native-vector-icons';
    import { ICONS_CODEPOINTS } from '@danske/sapphire-icons/font/codepoints';
    const IconComponent = createIconSet(ICONS_CODEPOINTS, 'icons', 'icons.ttf');