mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
make message part of spinner component
This commit is contained in:
parent
4ab8fabb81
commit
a249302a42
@ -25,7 +25,3 @@
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.loaderMessage {
|
||||
color: $brand-grey-light;
|
||||
}
|
||||
|
@ -128,10 +128,7 @@ class App extends Component<{}, AppState> {
|
||||
<main className={styles.main}>
|
||||
{this.state.isLoading ? (
|
||||
<div className={styles.loader}>
|
||||
<Spinner />
|
||||
<div className={styles.loaderMessage}>
|
||||
Connecting to Ocean...
|
||||
</div>
|
||||
<Spinner message="Connecting to Ocean..." />
|
||||
</div>
|
||||
) : (
|
||||
<Routes />
|
||||
|
@ -22,6 +22,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.spinnerMessage {
|
||||
color: $brand-grey-light;
|
||||
margin-top: $spacer / 2;
|
||||
}
|
||||
|
||||
@keyframes spinner {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
|
@ -1,6 +1,10 @@
|
||||
import React from 'react'
|
||||
import styles from './Spinner.module.scss'
|
||||
|
||||
const Spinner = () => <div className={styles.spinner} />
|
||||
const Spinner = ({ message }: { message?: string }) => (
|
||||
<div className={styles.spinner}>
|
||||
{message && <div className={styles.spinnerMessage}>{message}</div>}
|
||||
</div>
|
||||
)
|
||||
|
||||
export default Spinner
|
||||
|
Loading…
Reference in New Issue
Block a user