The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

28 rader
672 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. disabled: PropTypes.bool,
  8. visible: PropTypes.bool,
  9. }
  10. static defaultProps = {
  11. visible: true,
  12. }
  13. render() {
  14. const { disabled, visible } = this.props;
  15. return (
  16. <button className='load-more' disabled={disabled || !visible} style={{ visibility: visible ? 'visible' : 'hidden' }} onClick={this.props.onClick}>
  17. <FormattedMessage id='status.load_more' defaultMessage='Load more' />
  18. </button>
  19. );
  20. }
  21. }