Design System Utils Versions Save

👩‍🎨 Access your design tokens with ease

v0.6.0

6 years ago

This release adds two new, but related feature:

A function that can convert em/rem values into px

e.g.

toPx('1.875rem', 16) // 30px

Allow the ds.fontSize() method to return px values regardless of options.fontSizeUnit by adding a new parameter

e.g.

ds1.fontSize('base', true) // 20px

0.4.0

6 years ago
  • Jest tests have been added for all methods
  • the config has been moved out of the design system and into a new, 2nd parameter on the constructor

v0.3.0

6 years ago
  • Fixed small error with the documentation
  • Added a new alternative to the ds.spacing() function: ds.space()

0.2.0

6 years ago

Updated

Renamed a few of the methods to be shorter and faster to type.

  • getValue() -> get()
  • getColor() -> color()
  • getFontSize() -> fontSize()
  • getSpacing() -> spacing()
  • getBreakpoint() -> bp()
  • getZIndex() -> z()
  • getSpacing() -> spacing()

Updated examples to work with new methods

Fixed

The ESM module path was wrong, this has now been fixed.. 🤦‍♂️