@@ -10,12 +10,11 @@ import mdx from './Input.mdx';
10
10
import { parseAccessory } from './storyUtils' ;
11
11
12
12
const prefixSuffixOpts = {
13
- None : null ,
14
- Text : '$' ,
13
+ $ : 'Text' ,
15
14
...getAvailableIcons ( ) . reduce < KeyValue < string > > ( ( prev , c ) => {
16
15
return {
17
16
...prev ,
18
- [ `Icon: ${ c } ` ] : `icon- ${ c } ` ,
17
+ [ `icon- ${ c } ` ] : `Icon: ${ c } ` ,
19
18
} ;
20
19
} , { } ) ,
21
20
} ;
@@ -43,20 +42,22 @@ const meta: Meta = {
43
42
prefixVisible : {
44
43
control : {
45
44
type : 'select' ,
46
- options : prefixSuffixOpts ,
45
+ labels : prefixSuffixOpts ,
47
46
} ,
47
+ options : [ null , ...Object . keys ( prefixSuffixOpts ) ] ,
48
48
} ,
49
49
suffixVisible : {
50
50
control : {
51
51
type : 'select' ,
52
- options : prefixSuffixOpts ,
52
+ labels : prefixSuffixOpts ,
53
53
} ,
54
+ options : [ null , ...Object . keys ( prefixSuffixOpts ) ] ,
54
55
} ,
55
56
type : {
56
57
control : {
57
58
type : 'select' ,
58
- options : [ 'text' , 'number' , 'password' ] ,
59
59
} ,
60
+ options : [ 'text' , 'number' , 'password' ] ,
60
61
} ,
61
62
// validation: { name: 'Validation regex (will do a partial match if you do not anchor it)' },
62
63
width : { control : { type : 'range' , min : 10 , max : 200 , step : 10 } } ,
0 commit comments