dibk-design
v10.5.9
Published
Shared components for DIBK applications
Keywords
Readme
DIBK design
Shared components for DIBK applications
Getting Started
Install Dependencies
This project uses pnpm as the package manager.
pnpm installRun Storybook for Development
To view and work on components in isolation, run the Storybook development server:
pnpm run storybookThis will open Storybook in your browser, usually at
http://localhost:6006.
Building for Production
When you need to create a distributable version of the library or the Storybook site, use the following commands.
Build Library
Bundles the library for production and generates TypeScript types. The output is saved to the /dist folder.
pnpm run buildBuild TypeScript Types
Only generates the TypeScript declaration files (.d.ts).
pnpm run build:typesBuild Storybook
Builds the Storybook as a static web application. The output is saved to the /storybook-static folder.
pnpm run build-storybookStyles & tokens
This package ships two CSS entrypoints:
dibk-design/theme.css— Tailwind-friendly theme tokens (via@theme)dibk-design/tokens.css— plain CSS variables for non-Tailwind apps
Use with Tailwind (recommended)
Import the theme tokens in your global CSS:
@import "tailwindcss";
@import "dibk-design/theme.css";Use without Tailwind
Import the plain tokens instead:
@import "dibk-design/tokens.css";Use with Next.js
- Import the CSS entrypoint in your
globals.css
@import "tailwindcss";
@import "dibk-design/theme.css";- Import component from the library
"use client"
import React from 'react'
import { Button } from 'dibk-design'
const Home = () => {
return (
<main>
<Button onClick={() => {}} size="small" color="primary" content="Button">
I'm a button
</Button>
</main>
)
}
export default Home