From 2ce219ef429663069cc8bbe6474191ddc1fb9a22 Mon Sep 17 00:00:00 2001 From: Oleksii Dykan Date: Mon, 18 Jun 2018 09:11:16 -0700 Subject: [PATCH] Fix componentkit generator (#785) Summary: Fixes some inconsistencies in yoga playground Closes https://github.com/facebook/yoga/pull/785 Reviewed By: danielbuechele Differential Revision: D8480993 Pulled By: alickbass fbshipit-source-id: 395d77bae28462d3e03d666287bdc64137b84c68 --- website/src/components/Playground/CodeComponentKit.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/components/Playground/CodeComponentKit.js b/website/src/components/Playground/CodeComponentKit.js index fea711af..9dd71a2f 100644 --- a/website/src/components/Playground/CodeComponentKit.js +++ b/website/src/components/Playground/CodeComponentKit.js @@ -137,9 +137,9 @@ function getLayoutCode( )}\n${indent}\t},`, ), ); - lines.push(indent + `}]${isRoot ? ';' : ''}`); + lines.push(indent + `}]${isRoot ? ';' : ','}`); } else { - lines[lines.length - 1] += ']'; + lines[lines.length - 1] += '],'; CKFlexboxComponentChild.forEach(key => { let line = renderKey(node, key, indent); if (line) { @@ -165,7 +165,7 @@ function renderKey(node: Yoga$Node, key: string, indent: string): ?string { ); } - ['top', 'left', 'right', 'bottom'].forEach(pKey => { + ['top', 'start', 'end', 'bottom'].forEach(pKey => { if (node[key][pKey]) { lines.push(indent + `\t.${pKey} = ${getValue(node[key][pKey])},`); }