mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Minor tweaks
This commit is contained in:
parent
ae66d04845
commit
c66c0cb96f
@ -48,6 +48,7 @@ const BASE_CODEMIRROR_OPTIONS = {
|
|||||||
placeholder: 'Start Typing...',
|
placeholder: 'Start Typing...',
|
||||||
foldGutter: true,
|
foldGutter: true,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
|
lineWrapping: false,
|
||||||
gutters: [
|
gutters: [
|
||||||
'CodeMirror-linenumbers',
|
'CodeMirror-linenumbers',
|
||||||
'CodeMirror-foldgutter',
|
'CodeMirror-foldgutter',
|
||||||
|
@ -15,7 +15,9 @@ class PromptModal extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.refs.input.focus();
|
this.refs.input.focus();
|
||||||
this.refs.input.select();
|
if (this.props.selectText) {
|
||||||
|
this.refs.input.select();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
@ -32,8 +34,8 @@ class PromptModal extends Component {
|
|||||||
<Modal ref="modal" onClose={onClose}>
|
<Modal ref="modal" onClose={onClose}>
|
||||||
<ModalHeader>{headerName}</ModalHeader>
|
<ModalHeader>{headerName}</ModalHeader>
|
||||||
<ModalBody className="wide">
|
<ModalBody className="wide">
|
||||||
<form onSubmit={this._onSubmit.bind(this)} className="wide">
|
<form onSubmit={this._onSubmit.bind(this)} className="wide pad">
|
||||||
<div className="form-control form-control--outlined">
|
<div className="form-control form-control--outlined form-control--wide">
|
||||||
<input ref="input" type="text"/>
|
<input ref="input" type="text"/>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -52,9 +54,9 @@ class PromptModal extends Component {
|
|||||||
PromptModal.propTypes = {
|
PromptModal.propTypes = {
|
||||||
onSubmit: PropTypes.func.isRequired,
|
onSubmit: PropTypes.func.isRequired,
|
||||||
headerName: PropTypes.string.isRequired,
|
headerName: PropTypes.string.isRequired,
|
||||||
|
|
||||||
defaultValue: PropTypes.string,
|
defaultValue: PropTypes.string,
|
||||||
submitName: PropTypes.string,
|
submitName: PropTypes.string,
|
||||||
|
selectText: PropTypes.bool,
|
||||||
onClose: PropTypes.func
|
onClose: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,7 +55,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Push form all the way to the sides if inside label
|
// Push form all the way to the sides if inside label
|
||||||
label > .form-control {
|
label > .form-control,
|
||||||
|
.form-control--wide {
|
||||||
margin-left: 0 !important;
|
margin-left: 0 !important;
|
||||||
margin-right: 0 !important;
|
margin-right: 0 !important;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user