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