fix linting, tests

This commit is contained in:
Matthew Taylor 2017-11-08 10:13:17 -05:00
parent 533e007ac9
commit e384c07e3d
3 changed files with 7 additions and 10 deletions

View file

@ -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}
>
<div
@ -45,7 +43,7 @@ class Dropdown extends React.Component {
[styles.modOpen]: this.state.isOpen,
[styles.modClosed]: !this.state.isOpen
})}
onClick={this.toggleOpenState}
onClick={this.handleToggleOpenState}
>
{this.props.children}
<img

View file

@ -35,7 +35,6 @@ import styles from './paint-editor.css';
import groupIcon from './icons/group.svg';
import redoIcon from './icons/redo.svg';
import rotationPointIcon from './icons/rotation-point.svg';
import sendBackIcon from './icons/send-back.svg';
import sendBackwardIcon from './icons/send-backward.svg';
import sendForwardIcon from './icons/send-forward.svg';

View file

@ -1,5 +1,5 @@
/* eslint-env jest */
import Modes from '../../src/modes/modes';
import Modes from '../../src/lib/modes';
import reducer from '../../src/reducers/modes';
import {changeMode} from '../../src/reducers/modes';