闭社主体 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.

26 lines
602 B

  1. import React from 'react';
  2. import { FormattedMessage } from 'react-intl';
  3. import PropTypes from 'prop-types';
  4. export default class LoadMore extends React.PureComponent {
  5. static propTypes = {
  6. onClick: PropTypes.func,
  7. visible: PropTypes.bool,
  8. }
  9. static defaultProps = {
  10. visible: true,
  11. }
  12. render() {
  13. const { visible } = this.props;
  14. return (
  15. <button className='load-more' disabled={!visible} style={{ opacity: visible ? 1 : 0 }} onClick={this.props.onClick}>
  16. <FormattedMessage id='status.load_more' defaultMessage='Load more' />
  17. </button>
  18. );
  19. }
  20. }