2017-05-03 09:04:16 +09:00
|
|
|
import React from 'react';
|
2017-04-22 03:05:35 +09:00
|
|
|
import PropTypes from 'prop-types';
|
2017-04-08 20:07:55 +09:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
2017-05-21 00:31:47 +09:00
|
|
|
clear: { id: 'notifications.clear', defaultMessage: 'Clear notifications' },
|
2017-04-08 20:07:55 +09:00
|
|
|
});
|
|
|
|
|
2017-04-22 03:05:35 +09:00
|
|
|
class ClearColumnButton extends React.Component {
|
2017-04-08 20:07:55 +09:00
|
|
|
|
2017-05-12 21:44:10 +09:00
|
|
|
static propTypes = {
|
|
|
|
onClick: PropTypes.func.isRequired,
|
2017-05-21 00:31:47 +09:00
|
|
|
intl: PropTypes.object.isRequired,
|
2017-05-12 21:44:10 +09:00
|
|
|
};
|
|
|
|
|
2017-04-08 20:07:55 +09:00
|
|
|
render () {
|
|
|
|
const { intl } = this.props;
|
|
|
|
|
|
|
|
return (
|
2017-04-15 20:27:27 +09:00
|
|
|
<div role='button' title={intl.formatMessage(messages.clear)} className='column-icon column-icon-clear' tabIndex='0' onClick={this.props.onClick}>
|
2017-04-08 20:07:55 +09:00
|
|
|
<i className='fa fa-eraser' />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2017-05-21 00:31:47 +09:00
|
|
|
|
2017-04-22 03:05:35 +09:00
|
|
|
}
|
|
|
|
|
2017-04-08 20:07:55 +09:00
|
|
|
export default injectIntl(ClearColumnButton);
|