File tree Expand file tree Collapse file tree 1 file changed +20
-17
lines changed
public/app/features/dashboard-scene/sharing/ExportButton Expand file tree Collapse file tree 1 file changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -56,24 +56,26 @@ function ExportAsJsonRenderer({ model }: SceneComponentProps<ExportAsJson>) {
56
56
/>
57
57
< Label > { switchLabel } </ Label >
58
58
</ Stack >
59
- < AutoSizer disableHeight className = { styles . codeEditorBox } data-testid = { selector . codeEditor } >
60
- { ( { width } ) => {
61
- if ( dashboardJson . value ) {
62
- return (
63
- < CodeEditor
64
- value = { dashboardJson . value }
65
- language = "json"
66
- showMiniMap = { false }
67
- height = "500px"
68
- width = { width }
69
- readOnly = { true }
70
- />
71
- ) ;
72
- }
59
+ < div className = { styles . codeEditorBox } >
60
+ < AutoSizer data-testid = { selector . codeEditor } >
61
+ { ( { width, height } ) => {
62
+ if ( dashboardJson . value ) {
63
+ return (
64
+ < CodeEditor
65
+ value = { dashboardJson . value }
66
+ language = "json"
67
+ showMiniMap = { false }
68
+ height = { height }
69
+ width = { width }
70
+ readOnly = { true }
71
+ />
72
+ ) ;
73
+ }
73
74
74
- return dashboardJson . loading && < Spinner /> ;
75
- } }
76
- </ AutoSizer >
75
+ return dashboardJson . loading && < Spinner /> ;
76
+ } }
77
+ </ AutoSizer >
78
+ </ div >
77
79
< div className = { styles . container } >
78
80
< Stack gap = { 1 } flex = { 1 } direction = { { xs : 'column' , sm : 'row' } } >
79
81
< Button
@@ -111,6 +113,7 @@ function getStyles(theme: GrafanaTheme2) {
111
113
return {
112
114
codeEditorBox : css ( {
113
115
margin : `${ theme . spacing ( 2 ) } 0` ,
116
+ height : '75%' ,
114
117
} ) ,
115
118
container : css ( {
116
119
paddingBottom : theme . spacing ( 2 ) ,
You can’t perform that action at this time.
0 commit comments