Commit
+12 -12 +/-1 browse
1 | diff --git a/build/to-figmatokens.js b/build/to-figmatokens.js |
2 | index a529428..85c6350 100644 |
3 | --- a/build/to-figmatokens.js |
4 | +++ b/build/to-figmatokens.js |
5 | @@ -15,25 +15,25 @@ export const toFigmaTokens = props => { |
6 | .map(hueName => hueName.toLowerCase()) |
7 | let isColor = colors.some(color => key.includes(color)) |
8 | |
9 | - if (isLength) meta.$type = 'sizing' |
10 | - else if (isBorder) meta.$type = 'borderWidth' |
11 | - else if (isRadius) meta.$type = 'borderRadius' |
12 | - else if (isShadow) meta.$type = 'boxShadow' |
13 | - else if (isColor) meta.$type = 'color' |
14 | - else meta.$type = 'other' |
15 | + if (isLength) meta.type = 'sizing' |
16 | + else if (isBorder) meta.type = 'borderWidth' |
17 | + else if (isRadius) meta.type = 'borderRadius' |
18 | + else if (isShadow) meta.type = 'boxShadow' |
19 | + else if (isColor) meta.type = 'color' |
20 | + else meta.type = 'other' |
21 | |
22 | - if (!(meta.$type in figmatokens)) figmatokens[meta.$type] = {} |
23 | + if (!(meta.type in figmatokens)) figmatokens[meta.type] = {} |
24 | |
25 | if (isColor) { |
26 | let color = /--(.+?)-/.exec(key)[1] |
27 | - if (!(color in figmatokens[meta.$type])) figmatokens[meta.$type][color] = {} |
28 | - figmatokens[meta.$type][color][key] = { |
29 | - $value: token, |
30 | + if (!(color in figmatokens[meta.type])) figmatokens[meta.type][color] = {} |
31 | + figmatokens[meta.type][color][key] = { |
32 | + value: token, |
33 | ...meta, |
34 | } |
35 | } else { |
36 | - figmatokens[meta.$type][key] = { |
37 | - $value: token, |
38 | + figmatokens[meta.type][key] = { |
39 | + value: token, |
40 | ...meta, |
41 | } |
42 | } |