Fix issues with top, bottom, left, right keys in generated React Native code #841

Closed
dhruska wants to merge 2 commits from @dhruska/fix-position-properties into main
Showing only changes of commit a6741c2556 - Show all commits

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])},`
);
}
});