mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana-ui: disables storybook controls that are irrelevant (#35250)
* Grafana-ui: disables storybook controls that are irrelevant * excluded unused control in Select story * made timeRange control visisble in GraphNG story
This commit is contained in:
parent
7ae656ff16
commit
808b9a3126
@ -17,6 +17,12 @@ export default {
|
||||
docs: {
|
||||
page: mdx,
|
||||
},
|
||||
knobs: {
|
||||
disable: true,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['onRemove'],
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
severity: { control: { type: 'select', options: severities } },
|
||||
|
@ -10,7 +10,7 @@ export default {
|
||||
decorators: [withCenteredStory],
|
||||
parameters: {
|
||||
controls: {
|
||||
exclude: ['className', 'value', 'fieldNames'],
|
||||
exclude: ['className', 'value', 'fieldNames', 'loadData', 'onChange', 'onPopupVisibleChange'],
|
||||
},
|
||||
},
|
||||
args: {
|
||||
|
@ -40,7 +40,16 @@ export default {
|
||||
page: mdx,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['placeholder', 'initialValue', 'changeOnSelect'],
|
||||
exclude: [
|
||||
'placeholder',
|
||||
'initialValue',
|
||||
'changeOnSelect',
|
||||
'onSelect',
|
||||
'loadData',
|
||||
'onChange',
|
||||
'onPopupVisibleChange',
|
||||
'formatCreateLabel',
|
||||
],
|
||||
},
|
||||
},
|
||||
args: {
|
||||
|
@ -14,7 +14,7 @@ export default {
|
||||
page: mdx,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['size', 'variant', 'icon', 'className', 'fullWidth'],
|
||||
exclude: ['size', 'variant', 'icon', 'className', 'fullWidth', 'getText', 'onClipboardCopy', 'onClipboardError'],
|
||||
},
|
||||
},
|
||||
} as Meta;
|
||||
|
@ -18,7 +18,7 @@ export default {
|
||||
page: mdx,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['className'],
|
||||
exclude: ['className', 'onClick', 'onCancel', 'onConfirm'],
|
||||
},
|
||||
},
|
||||
args: {
|
||||
|
@ -14,6 +14,12 @@ export default {
|
||||
docs: {
|
||||
page: mdx,
|
||||
},
|
||||
knobs: {
|
||||
disable: true,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['onClose'],
|
||||
},
|
||||
},
|
||||
args: {
|
||||
closeOnMaskClick: true,
|
||||
|
@ -8,8 +8,9 @@ export default {
|
||||
title: 'Forms/Field',
|
||||
component: Field,
|
||||
argTypes: {
|
||||
children: { control: { disable: true } },
|
||||
className: { control: { disable: true } },
|
||||
label: { control: { type: 'text' } },
|
||||
description: { control: { type: 'text' } },
|
||||
error: { control: { type: 'text' } },
|
||||
},
|
||||
parameters: {
|
||||
docs: {
|
||||
@ -18,6 +19,9 @@ export default {
|
||||
knobs: {
|
||||
disabled: true,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['children', 'className'],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -12,7 +12,7 @@ export default {
|
||||
decorators: [withCenteredStory],
|
||||
parameters: {
|
||||
controls: {
|
||||
exclude: ['inputRef'],
|
||||
exclude: ['inputRef', 'onBlur', 'onFocus', 'onChange'],
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
|
@ -30,6 +30,19 @@ export default {
|
||||
'defaultValue',
|
||||
'loading',
|
||||
'aria-label',
|
||||
'noOptionsMessage',
|
||||
'onChange',
|
||||
'onBlur',
|
||||
'onKeyDown',
|
||||
'filterOption',
|
||||
'formatCreateLabel',
|
||||
'getOptionLabel',
|
||||
'getOptionValue',
|
||||
'onCloseMenu',
|
||||
'onCreateOption',
|
||||
'onInputChange',
|
||||
'onOpenMenu',
|
||||
'isOptionDisabled',
|
||||
],
|
||||
},
|
||||
},
|
||||
|
@ -8,7 +8,7 @@ export default {
|
||||
component: Switch,
|
||||
parameters: {
|
||||
controls: {
|
||||
exclude: ['className', 'labelClass', 'switchClass'],
|
||||
exclude: ['className', 'labelClass', 'switchClass', 'onChange'],
|
||||
},
|
||||
},
|
||||
} as Meta;
|
||||
|
@ -11,7 +11,7 @@ export default {
|
||||
page: mdx,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['className', 'options', 'value'],
|
||||
exclude: ['className', 'options', 'value', 'onChange'],
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
|
@ -14,7 +14,7 @@ export default {
|
||||
decorators: [withCenteredStory],
|
||||
parameters: {
|
||||
controls: {
|
||||
exclude: ['className', 'timeRange', 'data', 'legend', 'fields'],
|
||||
exclude: ['className', 'data', 'legend', 'fields', 'structureRev', 'onLegendClick', 'preparePlotFrame'],
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
|
@ -14,17 +14,17 @@ export default {
|
||||
docs: {
|
||||
page: mdx,
|
||||
},
|
||||
knobs: {
|
||||
disable: true,
|
||||
},
|
||||
controls: {
|
||||
exclude: ['onDismiss', 'children'],
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
onDismiss: { action: 'Dismissed' },
|
||||
featureState: {
|
||||
control: { type: 'select', options: ['alpha', 'beta', undefined] },
|
||||
},
|
||||
children: {
|
||||
table: {
|
||||
disable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -45,6 +45,7 @@ export default {
|
||||
'aria-label',
|
||||
'noOptionsMessage',
|
||||
'menuPosition',
|
||||
'isValidNewOption',
|
||||
'value',
|
||||
],
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user