~cytrogen/masto-fe

ref: 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 masto-fe/app/javascript/mastodon/features/ui/components/column_loading.jsx -rw-r--r-- 802 bytes
44a7d87c — Renaud Chaput Rename JSX files with proper `.jsx` extension (#23733) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React from 'react';
import PropTypes from 'prop-types';

import Column from '../../../components/column';
import ColumnHeader from '../../../components/column_header';
import ImmutablePureComponent from 'react-immutable-pure-component';

export default class ColumnLoading extends ImmutablePureComponent {

  static propTypes = {
    title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
    icon: PropTypes.string,
    multiColumn: PropTypes.bool,
  };

  static defaultProps = {
    title: '',
    icon: '',
  };

  render() {
    let { title, icon, multiColumn } = this.props;

    return (
      <Column>
        <ColumnHeader icon={icon} title={title} multiColumn={multiColumn} focusable={false} placeholder />
        <div className='scrollable' />
      </Column>
    );
  }

}