mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
refactor(console): remove min-height for readonly code editors (#4350)
This commit is contained in:
parent
758510a13f
commit
c4a9246071
2 changed files with 7 additions and 5 deletions
|
@ -59,10 +59,12 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
textarea,
|
||||
pre {
|
||||
display: flex;
|
||||
min-height: 80px;
|
||||
&:not(.readonly) {
|
||||
textarea,
|
||||
pre {
|
||||
display: flex;
|
||||
min-height: 80px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ function CodeEditor({
|
|||
<div className={classNames(styles.container, className)}>
|
||||
{isShowingPlaceholder && <div className={styles.placeholder}>{placeholder}</div>}
|
||||
<CopyToClipboard value={value ?? ''} variant="icon" className={styles.copy} />
|
||||
<div ref={editorRef} className={styles.editor}>
|
||||
<div ref={editorRef} className={classNames(styles.editor, isReadonly && styles.readonly)}>
|
||||
{/* SyntaxHighlighter is a readonly component, so a transparent <textarea> layer is needed
|
||||
in order to support user interactions, such as code editing, copy-pasting, etc. */}
|
||||
<textarea
|
||||
|
|
Loading…
Add table
Reference in a new issue