Socket
Socket
Sign inDemoInstall

@digitalservice4germany/digital-service-library

Package Overview
Dependencies
4
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @digitalservice4germany/digital-service-library

Component Library for and by DigitalService4Germany


Version published
Weekly downloads
18
increased by500%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Digital Service 4 Germany Logo

digital-service-library

Component Library for and by DigitalService4Germany

Documentation version codecov Issues MIT License

Requirements

  • React
  • TailwindCSS

Installation

npm install --save @digitalservice4germany/digital-service-library

Configure TailwindCSS

The library expects an existing TailwindCSS setup in your project. Please change your tailwind.config.js in two places.

  1. add the preset require("@digitalservice4germany/digital-service-library").TailwindConfig
  2. add the path to the library's components "./node_modules/@digitalservice4germany/digital-service-library/dist/esm/index.js" to your array of content paths

Afterwards your config might look like this:

module.exports = {
  presets: [
    require("@digitalservice4germany/digital-service-library").TailwindConfig,
  ],
  content: [
    "./app/**/*.{ts,tsx}",
    "./node_modules/@digitalservice4germany/digital-service-library/dist/esm/index.js",
  ],
};

Usage

import { Button } from "@digitalservice4germany/digital-service-library";

<Button secondary small>Hello button!</Button>

Development

Icons

Icon components are semi-automatically created from .svg file in assets/icons. Put the svg file there and run npm run build-icons to create components in src/components/Icons. Adjust the names in src/components/Icons/index.tsx

Yeoman Generator

Basic scaffolding tool to create a component skeleton. Setup:

cd generator-storybook
npm install
sudo npm link

If neccessary install yo:

sudo npm install -g yo

Run the generator:

yo storybook:component ComponentName

FAQs

Last updated on 20 Jan 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc