mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
3ec2084c23
commit
e8d5d5fbff
@ -10,12 +10,11 @@ import mdx from './Input.mdx';
|
|||||||
import { parseAccessory } from './storyUtils';
|
import { parseAccessory } from './storyUtils';
|
||||||
|
|
||||||
const prefixSuffixOpts = {
|
const prefixSuffixOpts = {
|
||||||
None: null,
|
$: 'Text',
|
||||||
Text: '$',
|
|
||||||
...getAvailableIcons().reduce<KeyValue<string>>((prev, c) => {
|
...getAvailableIcons().reduce<KeyValue<string>>((prev, c) => {
|
||||||
return {
|
return {
|
||||||
...prev,
|
...prev,
|
||||||
[`Icon: ${c}`]: `icon-${c}`,
|
[`icon-${c}`]: `Icon: ${c}`,
|
||||||
};
|
};
|
||||||
}, {}),
|
}, {}),
|
||||||
};
|
};
|
||||||
@ -43,20 +42,22 @@ const meta: Meta = {
|
|||||||
prefixVisible: {
|
prefixVisible: {
|
||||||
control: {
|
control: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: prefixSuffixOpts,
|
labels: prefixSuffixOpts,
|
||||||
},
|
},
|
||||||
|
options: [null, ...Object.keys(prefixSuffixOpts)],
|
||||||
},
|
},
|
||||||
suffixVisible: {
|
suffixVisible: {
|
||||||
control: {
|
control: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: prefixSuffixOpts,
|
labels: prefixSuffixOpts,
|
||||||
},
|
},
|
||||||
|
options: [null, ...Object.keys(prefixSuffixOpts)],
|
||||||
},
|
},
|
||||||
type: {
|
type: {
|
||||||
control: {
|
control: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: ['text', 'number', 'password'],
|
|
||||||
},
|
},
|
||||||
|
options: ['text', 'number', 'password'],
|
||||||
},
|
},
|
||||||
// validation: { name: 'Validation regex (will do a partial match if you do not anchor it)' },
|
// validation: { name: 'Validation regex (will do a partial match if you do not anchor it)' },
|
||||||
width: { control: { type: 'range', min: 10, max: 200, step: 10 } },
|
width: { control: { type: 'range', min: 10, max: 200, step: 10 } },
|
||||||
|
Loading…
Reference in New Issue
Block a user