npm.io
4.2.2 • Published 5 months ago

@leafygreen-ui/tokens

Licence
Apache-2.0
Version
4.2.2
Deps
3
Size
273 kB
Vulns
0
Weekly
0
Stars
271

Tokens

npm (scoped)

Installation

PNPM

pnpm add @leafygreen-ui/tokens
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>;