@manyone/ds-demo-tokens
v1.0.1
Published
Design tokens for the Demo Design System
Downloads
3
Maintainers
Keywords
Readme
Demo Design Tokens
This is design tokens for the Demo digital design system.
Usage
Add the design tokens and its peer dependencies to your project:
# using npm
npm install @manyone/ds-demo-tokens
Docs
To read the documentation, please visit Demo Digital Design System Documentation (Storybook).
Importing styles
/* SCSS */
/* import sass variables and a sass map named $tokens-shared */
@import "@manyone/ds-demo-tokens/scss/shared-map.scss";
/* import extend named %tokens-shared */
@import "@manyone/ds-demo-tokens/scss/shared-extend.scss";
/* import sass variables */
@import "@manyone/ds-demo-tokens/scss/shared.scss";
/* CSS */
/* import css variables on :root */
@import "@manyone/ds-demo-tokens/css/shared.css";
// JS
// import all variables as tokensShared
import * as tokensShared from "@manyone/ds-demo-tokens/js/shared.js";
// import a single variable
import { CoreColorBlue500 } from "@manyone/ds-demo-tokens/js/shared.js";
// JSON
// import all variables as an object
import sharedTokens from "@manyone/ds-demo-tokens/json/shared.json";
Theme tokens
To use a theme import both the shared and theme tokens:
/* example */
@import "@manyone/ds-demo-tokens/scss/shared-extends.scss";
@import "@manyone/ds-demo-tokens/scss/theme-dotcom-extend.scss";
:root {
@extend %tokens-shared;
@extend %tokens-theme-dotcom;
}
/* or */
:root {
@extend %tokens-shared;
}
.theme-dotcom {
@extend %tokens-theme-dotcom;
}