We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 706b902 commit ee1f96fCopy full SHA for ee1f96f
api.js
@@ -59,11 +59,16 @@ let fillProps = (rawCSS, props) => {
59
let matches = rawCSS.match(re);
60
if (matches && matches.length) {
61
for (let match of matches) {
62
- let keyword = match;
+ let keyword = match, replaceWord, propKeys;
63
keyword = keyword.replace('{this.props.', '');
64
keyword = keyword.substring(0, keyword.length-1); // remove }
65
keyword = keyword.trim();
66
- rawCSS = rawCSS.replace(match, props[keyword]);
+ replaceWord = props;
67
+ propKeys = keyword.split('.');
68
+ for (let i = 0; i < propKeys.length; i++) {
69
+ replaceWord = replaceWord[propKeys[i]];
70
+ }
71
+ rawCSS = rawCSS.replace(match, replaceWord);
72
}
73
74
return rawCSS;
0 commit comments