Minor tweaks

This commit is contained in:
Gregory Schier 2016-04-11 23:10:46 -07:00
parent ae66d04845
commit c66c0cb96f
3 changed files with 9 additions and 5 deletions

View File

@ -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',

View File

@ -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
}; };

View File

@ -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;
} }