Fix position keys in generated React Native code

This commit is contained in:
Donald Hruska
2018-12-20 11:52:07 -06:00
parent 6a02bff079
commit a6741c2556

View File

@@ -96,9 +96,11 @@ function getLayoutCode(node: LayoutRecordT, indent: string = ''): string {
) {
lines.push(
indent +
` ${key}${pKey[0].toUpperCase()}${pKey.substr(1)}: ${getValue(
node[key][pKey],
)},`,
` ${
key === "position"
? pKey
: `${key}${pKey[0].toUpperCase()}${pKey.substr(1)}`
}: ${getValue(node[key][pKey])},`
);
}
});