webamp/js/Close.jsx
2016-07-27 23:12:29 -07:00

23 lines
449 B
JavaScript

import React from 'react';
import {connect} from 'react-redux';
import {close} from './actionCreators';
class Close extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick() {
this.props.dispatch(close(this.props.mediaPlayer));
}
render() {
return <div
id='close'
onClick={this.handleClick}
/>;
}
}
module.exports = connect()(Close);