闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
725 B

  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { defineMessages, injectIntl } from 'react-intl';
  4. const messages = defineMessages({
  5. clear: { id: 'notifications.clear', defaultMessage: 'Clear notifications' },
  6. });
  7. class ClearColumnButton extends React.Component {
  8. static propTypes = {
  9. onClick: PropTypes.func.isRequired,
  10. intl: PropTypes.object.isRequired,
  11. };
  12. render () {
  13. const { intl } = this.props;
  14. return (
  15. <div role='button' title={intl.formatMessage(messages.clear)} className='column-icon column-icon-clear' tabIndex='0' onClick={this.props.onClick}>
  16. <i className='fa fa-eraser' />
  17. </div>
  18. );
  19. }
  20. }
  21. export default injectIntl(ClearColumnButton);