Skip to content

Commit 0eb4740

Browse files
committed
style(CodeEditor): address some comments
made by @vojtechszocs on DM
1 parent 32f481b commit 0eb4740

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

frontend/packages/console-shared/src/components/editor/CodeEditor.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const CodeEditor = React.forwardRef<CodeEditorRef, CodeEditorProps>((props, ref)
1515
const [monacoRef, setMonacoRef] = React.useState<CodeEditorRef['monaco'] | null>(null);
1616
const [usesValue] = React.useState<boolean>(value !== undefined);
1717

18-
const shortcutPopover = useShortcutPopover(props?.shortcutsPopoverProps);
18+
const shortcutPopover = useShortcutPopover(props.shortcutsPopoverProps);
1919

2020
const editorDidMount: EditorDidMount = React.useCallback(
2121
(editor, monaco) => {
@@ -80,11 +80,11 @@ const CodeEditor = React.forwardRef<CodeEditorRef, CodeEditorProps>((props, ref)
8080
<div style={{ minHeight }} className="ocs-yaml-editor">
8181
<BasicCodeEditor
8282
{...props}
83-
language={props?.language ?? Language.yaml}
83+
language={props.language ?? Language.yaml}
8484
code={value}
85-
options={{ ...defaultEditorOptions, ...props?.options }}
85+
options={{ ...defaultEditorOptions, ...props.options }}
8686
onEditorDidMount={editorDidMount}
87-
isFullHeight={props?.isFullHeight ?? true}
87+
isFullHeight={props.isFullHeight ?? true}
8888
customControls={ToolbarLinks ?? undefined}
8989
shortcutsPopoverProps={showShortcuts ? shortcutPopover : undefined}
9090
/>

0 commit comments

Comments
 (0)