bigbuffet-rw/app/soapbox/features/ui/components/column_loading.js

35 lines
836 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
import PropTypes from 'prop-types';
import React from 'react';
2020-03-27 13:59:38 -07:00
import ImmutablePureComponent from 'react-immutable-pure-component';
2022-01-10 14:01:24 -08:00
import Column from 'soapbox/components/column';
import LoadingIndicator from 'soapbox/components/loading_indicator';
2022-01-10 14:01:24 -08:00
import ColumnHeader from '../../../components/column_header';
2020-03-27 13:59:38 -07:00
export default class ColumnLoading extends ImmutablePureComponent {
static propTypes = {
title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
icon: PropTypes.string,
};
static defaultProps = {
title: '',
icon: '',
};
render() {
const { title, icon } = this.props;
2020-03-27 13:59:38 -07:00
return (
<Column>
<ColumnHeader icon={icon} title={title} focusable={false} />
<div className='column-loading'>
<LoadingIndicator />
</div>
2020-03-27 13:59:38 -07:00
</Column>
);
}
}