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.
27 lines
620 B
27 lines
620 B
8 years ago
|
import React from 'react';
|
||
8 years ago
|
import { FormattedMessage } from 'react-intl';
|
||
8 years ago
|
import PropTypes from 'prop-types';
|
||
8 years ago
|
|
||
7 years ago
|
export default class LoadMore extends React.PureComponent {
|
||
8 years ago
|
|
||
|
static propTypes = {
|
||
|
onClick: PropTypes.func,
|
||
7 years ago
|
visible: PropTypes.bool,
|
||
|
}
|
||
|
|
||
|
static defaultProps = {
|
||
|
visible: true,
|
||
8 years ago
|
}
|
||
|
|
||
|
render() {
|
||
7 years ago
|
const { visible } = this.props;
|
||
|
|
||
8 years ago
|
return (
|
||
7 years ago
|
<button className='load-more' disabled={!visible} style={{ visibility: visible ? 'visible' : 'hidden' }} onClick={this.props.onClick}>
|
||
8 years ago
|
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
|
||
|
</button>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|