Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datapunt/asc-assets

Package Overview
Dependencies
Maintainers
6
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datapunt/asc-assets

Contains icons and fonts

  • 0.24.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-91.73%
Maintainers
6
Weekly downloads
 
Created
Source

asc-assets

This is a standalone package that contains:

  • Fonts (including CSS font-face definitions)
  • Icons (SVGs as React components)

Install

Add this package to your project by running:

npm install @datapunt/asc-assets

Basic Usage

Icons

import { IconName } from '@datapunt/asc-assets'

return <IconName />

Fonts

Note: Some of the fonts that are used in Amsterdam are licensed, before you include these fonts in your application make sure that you have obtained a licence to do so.

There are currently two ways of including the fonts used in your application, you can either copy them in from this package in your build or include a version from the Amsterdam CDN. Note that if you want to use the version hosted by Amsterdam you must have an application that runs in the amsterdam.nl domain space.

Using the Amsterdam CDN

Add the following code to your index.html file:

<!-- This script is needed as specified by the font license -->
<script src="https://static.amsterdam.nl/fonts/mtiFontTrackingCode.min.js"></script>
<link href="https://static.amsterdam.nl/fonts/fonts.css" rel="stylesheet" />

There is nothing more to do, the fonts should now be available in your application.

Copying the files at build time

This step assumes that you are using WebPack, but it should be possible to do this with other tools or a simple shell script as well.

Add the following code to your WebPack configuration:

new CopyWebpackPlugin({
  patterns: [
    {
      from: './node_modules/@datapunt/asc-assets/static/fonts',
      to: 'fonts',
    },
  ],
})

And make sure to import the CSS file in your stylesheet:

@import '~@datapunt/asc-assets/static/fonts/fonts.css';

Build Project

yarn build # generates JSX components using the optimized SVG icons

FAQs

Package last updated on 21 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc