@bothrs/zero-height

This script will fetch a specified theme from zero height and put it into a Typescript file you can immediately start using.

Usage no npm install needed!

<script type="module">
  import bothrsZeroHeight from 'https://cdn.skypack.dev/@bothrs/zero-height';
</script>

README

Zero Height

This script will fetch a specified theme from zero height and put it into a Typescript file you can immediately start using.

Getting started

yarn add --dev @bothrs/zero-height

API

The command take a few input flags:

  • --token This will contain the token for the version of your theme. (Alternative is to set the ZERO_HEIGHT_TOKEN env variable.)
    The token can be found under 'Design Tokens' in the left navigation of zeroheight. Token is shown in the share tokens url (see image). image
  • --workspace This is the Zero Height workspace where you design system is located. (Example: .zeroheight.com)
  • --destination This is is the path to the file where you want you theme to be generated. (Example: ./src/styles/theme.ts)
  • --expo This flag will change some configuration in the theme to make it work with Expo. (Optional)
  • --css This flag will change the outputted file to vanilla css.

Example command

yarn sync-theme --token gh123hf1 --workspace bothrs.zeroheight.com --destination ./src/styles/theme.ts