@leafygreen-ui/tokens
v4.1.0
Published
leafyGreen UI Kit Tokens
Downloads
671,313
Keywords
Readme
Tokens
Installation
PNPM
pnpm add @leafygreen-ui/tokensYarn
yarn add @leafygreen-ui/tokensNPM
npm install @leafygreen-ui/tokensExample
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>;