about summary refs log tree commit diff
path: root/app/javascript/mastodon/components/load_more.js
diff options
context:
space:
mode:
authorSorin Davidoi <sorin.davidoi@gmail.com>2017-07-14 22:31:25 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-07-14 22:31:25 +0200
commit72bd73f605a7253daf445f76425da3182a1f669c (patch)
tree99cb5ff48fedc9c24e2862843e1b34ed008e047f /app/javascript/mastodon/components/load_more.js
parent1896a154f5f5edd4f94c58e5c69dd70ebc728e3d (diff)
Small style fixes (#4206)
* fix(components/media_modal): Center horizontally in Firefox

* fix(components/status_list): Do not remove load more button
Diffstat (limited to 'app/javascript/mastodon/components/load_more.js')
-rw-r--r--app/javascript/mastodon/components/load_more.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/load_more.js b/app/javascript/mastodon/components/load_more.js
index 2996d4dc8..e2fe1fed7 100644
--- a/app/javascript/mastodon/components/load_more.js
+++ b/app/javascript/mastodon/components/load_more.js
@@ -6,11 +6,18 @@ export default class LoadMore extends React.PureComponent {
 
   static propTypes = {
     onClick: PropTypes.func,
+    visible: PropTypes.bool,
+  }
+
+  static defaultProps = {
+    visible: true,
   }
 
   render() {
+    const { visible } = this.props;
+
     return (
-      <button className='load-more' onClick={this.props.onClick}>
+      <button className='load-more' disabled={!visible} style={{ opacity: visible ? 1 : 0 }} onClick={this.props.onClick}>
         <FormattedMessage id='status.load_more' defaultMessage='Load more' />
       </button>
     );