File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/gui/src/components/schemas Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ export function themeScale(path: string): DataTypeSchema<ThemeValue> {
34
34
options = { range ( 0 , numOptions ) . map ( ( x ) => x . toString ( ) ) }
35
35
/>
36
36
)
37
- // return null
38
37
} ,
39
38
// TODO function version of defaultValue, pass in theme
40
39
defaultValue : { type : 'theme' , path, index : 0 } ,
@@ -61,21 +60,20 @@ export function themeRecord(path: string): DataTypeSchema<ThemeNamedValue> {
61
60
} ,
62
61
inlineInput ( props ) {
63
62
const theme = useTheme ( )
64
- const options = get ( theme , path )
63
+ const options = Object . keys ( get ( theme , path ) )
65
64
return (
66
65
< SelectInput
67
66
label = ""
68
- value = { ` ${ props . value . key } ` }
67
+ value = { props . value . key || options [ 0 ] }
69
68
onChange = { ( value ) =>
70
69
props . onChange ( {
71
70
...props . value ,
72
71
key : value ,
73
72
} )
74
73
}
75
- options = { Object . keys ( options ) }
74
+ options = { options }
76
75
/>
77
76
)
78
- // return null
79
77
} ,
80
78
// TODO function version of defaultValue, pass in theme
81
79
defaultValue : { type : 'theme' , path, key : '' } ,
You can’t perform that action at this time.
0 commit comments