Closed thayna-oliveira closed 2 years ago
There is not a built-in format to do this, but I created a quick example that I believe does what you are looking for: https://stackblitz.com/edit/node-sq2wvj?file=sd.config.js
This is a really good idea though to provide union types for each type of design token!
This is exactly what I was looking for! I'll try it! thanks a lot, @dbanksdesign! 👏👏👏
@dbanksdesign it seems like your example here has since been updated. Can you provide a code snippet?
Hello,
I have the following
color.tokens.json
:And I want a list of the names of the tokens, something like this:
I want a list to create a type in the typescript, like this:
Do you guys know if it is possible? Or even if it is possible to generate a type?
I need this type to ensure my component only accepts the available tokens in the design system.