@leafygreen-ui/tokens
TypeScript icon, indicating that this package has built-in type declarations

2.6.0 • Public • Published

Tokens

npm (scoped)

Installation

Yarn

yarn add @leafygreen-ui/tokens

NPM

npm install @leafygreen-ui/tokens

Example

import { spacing, fontFamilies, breakpoints, transitionDuration } from '@leafygreen-ui/tokens';

const spacingExample = () => <span style={{ margin: spacing[1] }}>Hello World</span>;
const fontFamiliesExample = () => <span style={{ font-family: fontFamilies.default }}>Hello World</span>;
const mq = facepaint(
  breakpoints.map(bp => `@media (min-width: ${bp}px)`),
  { literal: true },
);
const transitionDurationExample = <span style={{ transition: transitionDuration.default }}>Hello World</span>;

/@leafygreen-ui/tokens/

    Package Sidebar

    Install

    npm i @leafygreen-ui/tokens

    Weekly Downloads

    402,878

    Version

    2.6.0

    License

    Apache-2.0

    Unpacked Size

    127 kB

    Total Files

    62

    Last publish

    Collaborators

    • stephl3
    • brookescarlett
    • shaneeza
    • hswolff
    • thesonofthomp