From bf8e8932773e9786678464b8265f2a52cabdaeb6 Mon Sep 17 00:00:00 2001 From: atanasster Date: Thu, 13 May 2021 07:54:23 +0300 Subject: [PATCH] fix: undefined option randomize --- core/core/src/controls-randomize.ts | 2 +- .../stories/src/stories/VariantButton/VariantButton.data.ts | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/core/core/src/controls-randomize.ts b/core/core/src/controls-randomize.ts index d385cee5d..092001dea 100644 --- a/core/core/src/controls-randomize.ts +++ b/core/core/src/controls-randomize.ts @@ -197,7 +197,7 @@ export const randomizeData = (controls: ComponentControls): RandomizedData => { } return { name, - value, + value: value === 'undefined' ? undefined : value, }; } default: diff --git a/examples/stories/src/stories/VariantButton/VariantButton.data.ts b/examples/stories/src/stories/VariantButton/VariantButton.data.ts index 6e1f488c5..61a2274a0 100644 --- a/examples/stories/src/stories/VariantButton/VariantButton.data.ts +++ b/examples/stories/src/stories/VariantButton/VariantButton.data.ts @@ -16,21 +16,16 @@ const data: Record> = { fontSize: 16, icon: 'none', iconSide: 'left', - iconSize: undefined, padding: 'large', }, '2': { text: 'Drew Terry', - variant: undefined, fontSize: 18, icon: 'search', iconSide: 'left', - iconSize: undefined, - padding: undefined, }, '3': { text: 'Anahi McLaughlin', - variant: undefined, fontSize: 14, icon: 'up-arrow', iconSide: 'left',