From 8888fe56b148c0d516a2585db0c5f7615ac66cb7 Mon Sep 17 00:00:00 2001 From: Hypnosphi Date: Sun, 14 Jan 2018 00:40:41 +0300 Subject: [PATCH] Addon-info: add keys for separator spans in OneOfType --- addons/info/src/components/types/OneOfType.js | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/info/src/components/types/OneOfType.js b/addons/info/src/components/types/OneOfType.js index 3c10aa68df4e..fab5bb53bc94 100644 --- a/addons/info/src/components/types/OneOfType.js +++ b/addons/info/src/components/types/OneOfType.js @@ -8,13 +8,13 @@ const OneOfType = ({ propType }) => { return ( {propType.value - .map((value, i) => [ - , - i < length - 1 ? | : null, - ]) + .map((value, i) => { + const key = `${value.name}${value.value ? `-${value.value}` : ''}`; + return [ + , + i < length - 1 ? | : null, + ]; + }) .reduce((acc, tuple) => acc.concat(tuple), [])} ); diff --git a/package.json b/package.json index 3e6e4755e86a..5c680dd0db12 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "publish": "lerna publish", "postpublish": "yarn --cwd lib/cli test -o", "repo-dirty-check": "node ./scripts/repo-dirty-check", - "start": "npm --prefix examples/cra-kitchen-sink run storybook", + "start": "npm --prefix examples/official-storybook run storybook", "test": "node ./scripts/test.js", "test-latest-cra": "npm --prefix lib/cli run test-latest-cra", "chromatic": "npm --prefix examples/official-storybook run chromatic"