dispatch/client/src/js/components/Navicon.js

18 lines
412 B
JavaScript
Raw Normal View History

2015-12-28 23:34:32 +00:00
import React, { Component } from 'react';
import { connect } from 'react-redux';
import pure from 'pure-render-decorator';
2016-01-11 22:31:06 +00:00
import { toggleMenu } from '../actions/ui';
2015-12-28 23:34:32 +00:00
@pure
class Navicon extends Component {
handleClick = () => this.props.dispatch(toggleMenu());
2016-01-05 18:29:22 +00:00
2015-12-28 23:34:32 +00:00
render() {
return (
2016-01-05 18:29:22 +00:00
<i className="icon-menu navicon" onClick={this.handleClick}></i>
2015-12-28 23:34:32 +00:00
);
}
}
export default connect()(Navicon);