Files
frontend-app-profile/src/profile/PageLoading.jsx
David Joy 8f37cc1a8d Organize the repo and export profile module properly (#262)
* Moving files to their new homes.

Subsequent commit will wire everything up again.

* Relink files and split stylesheet.

Requires adding resolve-url-loader to fix sass import relativity.

* Remove browserslist warning.

* Remove the need for ProfileMain

* Fix test issues - needed thunk.
2019-09-23 13:50:56 -04:00

38 lines
757 B
JavaScript

import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class PageLoading extends Component {
renderSrMessage() {
if (!this.props.srMessage) {
return null;
}
return (
<span className="sr-only">
{this.props.srMessage}
</span>
);
}
render() {
return (
<div>
<div
className="d-flex justify-content-center align-items-center flex-column"
style={{
height: '50vh',
}}
>
<div className="spinner-border text-primary" role="status">
{this.renderSrMessage()}
</div>
</div>
</div>
);
}
}
PageLoading.propTypes = {
srMessage: PropTypes.string.isRequired,
};