From e384c07e3d4aa577f9e42dafcc6beb88ab6a7480 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Wed, 8 Nov 2017 10:13:17 -0500 Subject: [PATCH] fix linting, tests --- src/components/dropdown/dropdown.jsx | 14 ++++++-------- src/components/paint-editor/paint-editor.jsx | 1 - test/unit/modes-reducer.test.js | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/dropdown/dropdown.jsx b/src/components/dropdown/dropdown.jsx index 94abe611..31d2ba6d 100644 --- a/src/components/dropdown/dropdown.jsx +++ b/src/components/dropdown/dropdown.jsx @@ -4,8 +4,6 @@ import Popover from 'react-popover'; import PropTypes from 'prop-types'; import React from 'react'; -import Button from '../button/button.jsx'; - import styles from './dropdown.css'; import dropdownIcon from './dropdown-caret.svg'; @@ -14,19 +12,19 @@ class Dropdown extends React.Component { constructor (props) { super(props); bindAll(this, [ - 'closePopover', - 'toggleOpenState' + 'handleClosePopover', + 'handleToggleOpenState' ]); this.state = { isOpen: false }; } - closePopover () { + handleClosePopover () { this.setState({ isOpen: false }); } - toggleOpenState () { + handleToggleOpenState () { this.setState({ isOpen: !this.state.isOpen }); @@ -37,7 +35,7 @@ class Dropdown extends React.Component { body={this.props.popoverContent} isOpen={this.state.isOpen} preferPlace="below" - onOuterAction={this.closePopover} + onOuterAction={this.handleClosePopover} {...this.props} >
{this.props.children}