figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Add support for Expand Composition tokens in Export

Open six7 opened this issue 3 years ago • 0 comments

We should add support for expanding composition tokens in the Export modal

An expanded composition token should have a value and a type property. The type property should have the type of the property that was set.

For example, the following input

{
  "cardDefault": {
    "type": "composition",
    "value": {
      "borderWidthLeft": "{sizing.md}",
      "borderRadius": "{radii.md}
    }
}

would produce this output:

{
  "cardDefault": {
    "borderWidthLeft": {
      "value": "{sizing.md}",
      "type": "borderWidth"
    },
    "borderRadius": {
      "value": "{radii.md},
      "type": "borderRadius"
    }
}

This is connected to #1000

six7 avatar Jul 08 '22 19:07 six7