Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something went wrong! Figma Tokens Version 66 #296

Closed
gyddfev opened this issue Oct 31, 2021 · 1 comment · Fixed by #226
Closed

Something went wrong! Figma Tokens Version 66 #296

gyddfev opened this issue Oct 31, 2021 · 1 comment · Fixed by #226

Comments

@gyddfev
Copy link

gyddfev commented Oct 31, 2021

Describe the bug
Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7Bvalue%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Restart the plugin and try again.

Figma Tokens Version 66

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or Screencasts
https://s6.jpg.cm/2021/10/31/I3zABT.gif

JSON (optional)
If possible, attach the JSON that leads to this bug.

"标题Text": {
"34Bold": {
"type": "typography",
"value": {
"fontFamily": {
"value": "$fontFamilies.pingfang-sc"
},
"fontWeight": {
"value": "Bold"
},
"lineHeight": {
"value": "$lineHeights.0"
},
"fontSize": {
"value": "34"
},
"letterSpacing": {
"value": "$letterSpacing.0"
},
"paragraphSpacing": {
"value": "$paragraphSpacing.0"
}
}
},
"32Bold": {
"type": "typography",
"value": {
"fontFamily": {
"value": "$fontFamilies.pingfang-sc"
},
"fontWeight": {
"value": "$fontWeights.pingfang-sc-0"
},
"lineHeight": {
"value": "$lineHeights.0"
},
"fontSize": {
"value": "$fontSize.0"
},
"letterSpacing": {
"value": "$letterSpacing.0"
},
"paragraphSpacing": {
"value": "$paragraphSpacing.0"
}
}
}
},

@six7
Copy link
Collaborator

six7 commented Oct 31, 2021

The error here lies in the definition of your typography tokens, they should be defined like this instead:

"32Bold": {
  "type": "typography",
  "value": {
    "fontFamily": "$fontFamilies.pingfang-sc",
    "fontWeight": "$fontWeights.pingfang-sc-0",
    ...
  }
}

The crash will be fixed in the next release, but the tokens should be entered like above

@six7 six7 mentioned this issue Oct 31, 2021
7 tasks
@six7 six7 closed this as completed in #226 Oct 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants