mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-09 06:55:03 +00:00
Merge pull request #4956 from bacteriostat/feature/single-line-editor-placeholder
feat: Add placeholder for SingleLineEditor
This commit is contained in:
@@ -26,6 +26,11 @@ const StyledWrapper = styled.div`
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 0;
|
||||
|
||||
.CodeMirror-placeholder {
|
||||
color: ${(props) => props.theme.codemirror.placeholder.color} !important;
|
||||
opacity: ${(props) => props.theme.codemirror.placeholder.opacity} !important
|
||||
}
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
|
||||
@@ -46,6 +46,7 @@ class SingleLineEditor extends Component {
|
||||
const noopHandler = () => {};
|
||||
|
||||
this.editor = CodeMirror(this.editorRef.current, {
|
||||
placeholder: this.props.placeholder ?? '',
|
||||
lineWrapping: false,
|
||||
lineNumbers: false,
|
||||
theme: this.props.theme === 'dark' ? 'monokai' : 'default',
|
||||
|
||||
Reference in New Issue
Block a user