Make builder queries vertically centered (again)

pull/1081/head
Alex P 2017-03-30 18:51:33 -07:00 committed by Andrew Watkins
parent 4de5c55b63
commit 822f8b3b44
2 changed files with 12 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import React, {PropTypes} from 'react'
import classNames from 'classnames'
const ENTER = 13
const ESCAPE = 27
@ -57,7 +58,9 @@ const RawQueryEditor = React.createClass({
onBlur={this.handleUpdate}
ref={(editor) => this.editor = editor}
value={value}
placeholder="Blank query"
placeholder="Enter a query..."
autoComplete="off"
spellCheck="false"
/>
{this.renderStatus(rawStatus)}
</div>
@ -69,7 +72,12 @@ const RawQueryEditor = React.createClass({
return null
}
return <div>{rawStatus.error || rawStatus.warn || rawStatus.success}</div>
return (
<div className={classNames("raw-text--status", {"raw-text--error": rawStatus.error, "raw-text--success": rawStatus.success, "raw-text--warning": rawStatus.warn})}>
<span className={classNames("icon", {stop: rawStatus.error, checkmark: rawStatus.success, "alert-triangle": rawStatus.warn})}></span>
{rawStatus.error || rawStatus.warn || rawStatus.success}
</div>
)
},
})

View File

@ -165,7 +165,8 @@ $query-builder--column-heading-height: 50px;
position: relative;
pre {
display: block;
display: flex;
align-items: center;
padding: 7px;
border: 2px solid $query-editor-tab-inactive;
background-color: $query-editor-tab-inactive;