The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

35 lines
864 B

  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { injectIntl, defineMessages } from 'react-intl';
  4. import Icon from 'mastodon/components/icon';
  5. const messages = defineMessages({
  6. load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
  7. });
  8. export default @injectIntl
  9. class LoadGap extends React.PureComponent {
  10. static propTypes = {
  11. disabled: PropTypes.bool,
  12. maxId: PropTypes.string,
  13. onClick: PropTypes.func.isRequired,
  14. intl: PropTypes.object.isRequired,
  15. };
  16. handleClick = () => {
  17. this.props.onClick(this.props.maxId);
  18. }
  19. render () {
  20. const { disabled, intl } = this.props;
  21. return (
  22. <button className='load-more load-gap' disabled={disabled} onClick={this.handleClick} aria-label={intl.formatMessage(messages.load_more)}>
  23. <Icon id='ellipsis-h' />
  24. </button>
  25. );
  26. }
  27. }