Grafana-ui: explicitly set storybook control types (#35265)

pull/35277/head
Uchechukwu Obasi 5 years ago committed by GitHub
parent 0a28304d2a
commit c39d0fa8c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/grafana-ui/src/components/Badge/Badge.story.tsx
  2. 10
      packages/grafana-ui/src/components/ValuePicker/ValuePicker.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' },
},
};

@ -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();

Loading…
Cancel
Save