mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 16:17:25 +02:00
style(v2): better loading screen
This commit is contained in:
parent
6cec7ce982
commit
62b5895ef8
2 changed files with 31 additions and 1 deletions
26
v2/lib/theme/Loading/index.js
Normal file
26
v2/lib/theme/Loading/index.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* Copyright (c) 2017-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
export default props => {
|
||||
if (props.error) {
|
||||
console.log(props.error);
|
||||
return <div align="center">Error</div>;
|
||||
}
|
||||
if (props.pastDelay) {
|
||||
return (
|
||||
<div className={styles.loader}>
|
||||
<p>Please wait a moment</p>
|
||||
<div className={styles.loaderSpinning} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue