File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ const CodeEditor: React.FC<CodeEditorInterface> & CodeEditorComposition = React.
87
87
cleanData = false ,
88
88
onBlur,
89
89
onFocus,
90
- adjustEditorHeightToContent,
90
+ adjustEditorHeightToContent = false ,
91
91
} ) => {
92
92
if ( cleanData ) {
93
93
value = cleanKubeManifest ( value )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface InformationBarProps {
22
22
children ?: React . ReactNode
23
23
}
24
24
25
- export interface CodeEditorInterface {
25
+ interface CodeEditorBaseInterface {
26
26
value ?: string
27
27
lineDecorationsWidth ?: number
28
28
responseType ?: string
@@ -36,7 +36,6 @@ export interface CodeEditorInterface {
36
36
readOnly ?: boolean
37
37
noParsing ?: boolean
38
38
inline ?: boolean
39
- height ?: number | string
40
39
shebang ?: string | JSX . Element
41
40
diffView ?: boolean
42
41
loading ?: boolean
@@ -48,9 +47,20 @@ export interface CodeEditorInterface {
48
47
isKubernetes ?: boolean
49
48
cleanData ?: boolean
50
49
chartVersion ?: any
51
- adjustEditorHeightToContent ?: boolean
52
50
}
53
51
52
+ export type CodeEditorInterface = CodeEditorBaseInterface &
53
+ (
54
+ | {
55
+ adjustEditorHeightToContent ?: boolean
56
+ height ?: never
57
+ }
58
+ | {
59
+ adjustEditorHeightToContent ?: never
60
+ height ?: number | string
61
+ }
62
+ )
63
+
54
64
export interface CodeEditorHeaderInterface {
55
65
children ?: any
56
66
className ?: string
You can’t perform that action at this time.
0 commit comments