Open f1to47 opened 1 year ago
I'm using the Style Dictionary and have created my own format, but it compiles the tokens with a "," separation and I need it to be ";"
`let shadowTokens = dictionary.allTokens.map(token => { if(token.type === 'boxShadow'){
let props = [] Object.entries(token.value).forEach(([key, value]) => { props = [...props, `--${token.name}-${key}:${value}`] }); console.log(props) } }).join('');`
The result is:
--shadow-1-x:0,--shadow-1-y:2,--shadow-1-blur:7,--shadow-1-spread:0,--shadow-1-color:#00000080,--shadow-1-type:dropShadow--shadow-2-x:0,--shadow-2-y:2,--shadow-2-blur:12,--shadow-2-spread:0,--shadow-2-color:#00000080,--shadow-2-type:dropShadow
@f1to47 change
}).join('');
by
}).join(';\n');
@f1to47 change }).join(''); by }).join(';\n');
Thanks!
I'm using the Style Dictionary and have created my own format, but it compiles the tokens with a "," separation and I need it to be ";"
`let shadowTokens = dictionary.allTokens.map(token => { if(token.type === 'boxShadow'){
The result is:
--shadow-1-x:0,--shadow-1-y:2,--shadow-1-blur:7,--shadow-1-spread:0,--shadow-1-color:#00000080,--shadow-1-type:dropShadow--shadow-2-x:0,--shadow-2-y:2,--shadow-2-blur:12,--shadow-2-spread:0,--shadow-2-color:#00000080,--shadow-2-type:dropShadow