]> cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/components/load_gap.js
Refactor icons in web UI to use Icon component (#9951)
[mastodon.git] / app / javascript / mastodon / components / load_gap.js
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
6 const messages = defineMessages({
7 load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
8 });
9
10 export default @injectIntl
11 class LoadGap extends React.PureComponent {
12
13 static propTypes = {
14 disabled: PropTypes.bool,
15 maxId: PropTypes.string,
16 onClick: PropTypes.func.isRequired,
17 intl: PropTypes.object.isRequired,
18 };
19
20 handleClick = () => {
21 this.props.onClick(this.props.maxId);
22 }
23
24 render () {
25 const { disabled, intl } = this.props;
26
27 return (
28 <button className='load-more load-gap' disabled={disabled} onClick={this.handleClick} aria-label={intl.formatMessage(messages.load_more)}>
29 <Icon id='ellipsis-h' />
30 </button>
31 );
32 }
33
34 }
This page took 0.105647 seconds and 4 git commands to generate.