Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jaalah committed Apr 17, 2024
1 parent b7d47ae commit aaac859
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ yarn install
```

## Build
> [!note]
>[!note]
You can use `yarn storybook` to view all the tokens we have available

```bash
Expand All @@ -15,25 +15,19 @@ yarn storybook
You should see something like this output:
```
==============================================
Theme: light
Processing... 1 of 3
- theme: default
- Platform: web
web/js
✔︎ dist/tokens.es6.js
✔︎ dist/theme.es6.js
✔︎ dist/theme.d.ts
js
✔︎ dist/tokens-nested.es6.js
✔︎ dist/tokens-nested.d.ts
✔︎ dist/tokens.d.ts
✔︎ dist/tokens.es6.js
web/scss
scss
✔︎ dist/tokens.scss
web/css
css
✔︎ dist/tokens.css
End processing
==============================================
```

Expand Down Expand Up @@ -128,3 +122,14 @@ $token-color-neutrals-100: #3A3A3F;
This shows a few things happening:
1. The build system does a deep merge of all the token JSON files defined in the `source` attribute of `config/build.ts`. This allows you to split up the token JSON files however you want.
2. The build system resolves references to other design tokens in other files as well. For example in `tokens/alias/light.json` the value `{color.neutrals.white}` gets resolved properly.

## Usage in Apps

Example:
```
import { Aliases, Components, Globals } from '@linode/design-language-system';

const { Color } = Globals;
const { Border, Interaction } = Aliases;
const { Button } = Components;
```

0 comments on commit aaac859

Please sign in to comment.