mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
fix(ui/code-editor): stretch code editor content full height [EE-5202] (#8673)
This commit is contained in:
parent
7f805ac5be
commit
d64e7eacfc
20 changed files with 60 additions and 57 deletions
|
@ -6,6 +6,7 @@ import { createTheme } from '@uiw/codemirror-themes';
|
|||
import { tags as highlightTags } from '@lezer/highlight';
|
||||
|
||||
import styles from './CodeEditor.module.css';
|
||||
import { TextTip } from './Tip/TextTip';
|
||||
|
||||
interface Props {
|
||||
id: string;
|
||||
|
@ -53,16 +54,18 @@ export function CodeEditor({
|
|||
const extensions = useMemo(() => (isYaml ? [yamlLanguage] : []), [isYaml]);
|
||||
|
||||
return (
|
||||
<CodeMirror
|
||||
className={styles.root}
|
||||
theme={theme}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
readOnly={readonly}
|
||||
placeholder={placeholder}
|
||||
id={id}
|
||||
extensions={extensions}
|
||||
height={height}
|
||||
/>
|
||||
<>
|
||||
{!!placeholder && <TextTip color="blue">{placeholder}</TextTip>}
|
||||
<CodeMirror
|
||||
className={styles.root}
|
||||
theme={theme}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
readOnly={readonly}
|
||||
id={id}
|
||||
extensions={extensions}
|
||||
height={height}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue