From 2108faff7c5da45e54dfae64bc98cf97659a866b Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 4 Jun 2021 17:07:37 -0400 Subject: [PATCH] Grafana-ui: explicitly set storybook control types (#35265) (#35274) (cherry picked from commit c39d0fa8c335dd7a16e769c072c97d653b0c2877) Co-authored-by: Uchechukwu Obasi --- .../grafana-ui/src/components/Badge/Badge.story.tsx | 3 ++- .../src/components/ValuePicker/ValuePicker.story.tsx | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/grafana-ui/src/components/Badge/Badge.story.tsx b/packages/grafana-ui/src/components/Badge/Badge.story.tsx index 1035be9cc37..18cff6a077b 100644 --- a/packages/grafana-ui/src/components/Badge/Badge.story.tsx +++ b/packages/grafana-ui/src/components/Badge/Badge.story.tsx @@ -14,8 +14,9 @@ export default { }, }, argTypes: { - icon: { control: { type: 'select', options: iconOptions } }, + icon: { options: iconOptions, control: { type: 'select' } }, color: { control: 'select' }, + text: { control: 'text' }, }, }; diff --git a/packages/grafana-ui/src/components/ValuePicker/ValuePicker.story.tsx b/packages/grafana-ui/src/components/ValuePicker/ValuePicker.story.tsx index 085e4839a22..a0e77981a5c 100644 --- a/packages/grafana-ui/src/components/ValuePicker/ValuePicker.story.tsx +++ b/packages/grafana-ui/src/components/ValuePicker/ValuePicker.story.tsx @@ -16,7 +16,7 @@ export default { page: mdx, }, knobs: { - disabled: true, + disable: true, }, controls: { exclude: ['onChange', 'options'], @@ -24,9 +24,9 @@ export default { }, argTypes: { variant: { + options: ['primary', 'secondary', 'destructive', 'link'], control: { type: 'select', - options: ['primary', 'secondary', 'destructive', 'link'], }, }, icon: { @@ -35,6 +35,12 @@ export default { options: getAvailableIcons(), }, }, + size: { + options: ['sm', 'md', 'lg'], + control: { + type: 'select', + }, + }, }, }; const options = generateOptions();