.circleci
.dependabot
.github
app
chewy
controllers
helpers
javascript
fonts
images
mastodon
actions
components
__tests__
account.js
attachment_list.js
autosuggest_emoji.js
autosuggest_hashtag.js
autosuggest_input.js
autosuggest_textarea.js
avatar.js
avatar_composite.js
avatar_overlay.js
button.js
column.js
column_back_button.js
column_back_button_slim.js
column_header.js
display_name.js
domain.js
dropdown_menu.js
error_boundary.js
gifv.js
hashtag.js
icon.js
icon_button.js
icon_with_badge.js
intersection_observer_article.js
load_gap.js
load_more.js
load_pending.js
loading_indicator.js
media_gallery.js
missing_indicator.js
modal_root.js
permalink.js
poll.js
radio_button.js
regeneration_indicator.js
relative_timestamp.js
scrollable_list.js
setting_text.js
status.js
status_action_bar.js
status_content.js
status_list.js
containers
features
locales
middleware
reducers
selectors
service_worker
storage
store
utils
api.js
base_polyfills.js
common.js
compare_id.js
extra_polyfills.js
initial_state.js
is_mobile.js
load_keyboard_extensions.js
load_polyfills.js
main.js
performance.js
ready.js
rtl.js
scroll.js
settings.js
stream.js
test_setup.js
uuid.js
packs
styles
lib
mailers
models
policies
presenters
serializers
services
validators
views
workers
bin
config
db
dist
lib
log
nanobox
public
spec
streaming
vendor
.buildpacks
.codeclimate.yml
.dockerignore
.editorconfig
.env.nanobox
.env.production.sample
.env.test
.env.vagrant
.eslintignore
.eslintrc.js
.foreman
.gitattributes
.gitignore
.haml-lint.yml
.nanoignore
.nvmrc
.profile
.rspec
.rubocop.yml
.ruby-version
.sass-lint.yml
.slugignore
.yarnclean
AUTHORS.md
Aptfile
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Capfile
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Procfile
Procfile.dev
README.md
Rakefile
Vagrantfile
app.json
babel.config.js
boxfile.yml
config.ru
crowdin.yml
docker-compose.yml
package.json
postcss.config.js
priv-config
scalingo.json
yarn.lock
* Refactor uses of icons to an Icon component in web UI * Refactor options passed to the Icon component * Make tests work with absolute component paths
35 lines
864 B
JavaScript
35 lines
864 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { injectIntl, defineMessages } from 'react-intl';
|
|
import Icon from 'mastodon/components/icon';
|
|
|
|
const messages = defineMessages({
|
|
load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
|
|
});
|
|
|
|
export default @injectIntl
|
|
class LoadGap extends React.PureComponent {
|
|
|
|
static propTypes = {
|
|
disabled: PropTypes.bool,
|
|
maxId: PropTypes.string,
|
|
onClick: PropTypes.func.isRequired,
|
|
intl: PropTypes.object.isRequired,
|
|
};
|
|
|
|
handleClick = () => {
|
|
this.props.onClick(this.props.maxId);
|
|
}
|
|
|
|
render () {
|
|
const { disabled, intl } = this.props;
|
|
|
|
return (
|
|
<button className='load-more load-gap' disabled={disabled} onClick={this.handleClick} aria-label={intl.formatMessage(messages.load_more)}>
|
|
<Icon id='ellipsis-h' />
|
|
</button>
|
|
);
|
|
}
|
|
|
|
}
|