extract overlay class name into constant
parent
3bd9c3b85c
commit
f716ef56ad
|
@ -2,6 +2,7 @@ import React, {Component, PropTypes} from 'react'
|
|||
|
||||
import DatabaseDropdown from 'shared/components/DatabaseDropdown'
|
||||
import OnClickOutside from 'shared/components/OnClickOutside'
|
||||
import {OVERLAY_CLASS} from 'shared/constants'
|
||||
|
||||
class WriteDataForm extends Component {
|
||||
constructor(props) {
|
||||
|
@ -24,7 +25,7 @@ class WriteDataForm extends Component {
|
|||
|
||||
handleClickOutside(e) {
|
||||
// guard against clicking to close error notification
|
||||
if (e.target.className === 'overlay-technology') {
|
||||
if (e.target.className === OVERLAY_CLASS) {
|
||||
const {onClose} = this.props
|
||||
onClose()
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import React, {PropTypes} from 'react'
|
||||
|
||||
import {OVERLAY_CLASS} from 'shared/constants'
|
||||
|
||||
const OverlayTechnologies = ({children}) => (
|
||||
<div className="overlay-technology">{children}</div>
|
||||
<div className={OVERLAY_CLASS}>{children}</div>
|
||||
)
|
||||
|
||||
const {node} = PropTypes
|
||||
|
|
|
@ -399,3 +399,5 @@ export const AUTOREFRESH_DEFAULT = 15000 // in milliseconds
|
|||
export const GRAPH = 'graph'
|
||||
export const TABLE = 'table'
|
||||
export const VIS_VIEWS = [GRAPH, TABLE]
|
||||
|
||||
export const OVERLAY_CLASS = 'overlay-technology'
|
||||
|
|
Loading…
Reference in New Issue