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%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.loaderMessage {
|
|
||||||
color: $brand-grey-light;
|
|
||||||
}
|
|
||||||
|
@ -128,10 +128,7 @@ class App extends Component<{}, AppState> {
|
|||||||
<main className={styles.main}>
|
<main className={styles.main}>
|
||||||
{this.state.isLoading ? (
|
{this.state.isLoading ? (
|
||||||
<div className={styles.loader}>
|
<div className={styles.loader}>
|
||||||
<Spinner />
|
<Spinner message="Connecting to Ocean..." />
|
||||||
<div className={styles.loaderMessage}>
|
|
||||||
Connecting to Ocean...
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Routes />
|
<Routes />
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spinnerMessage {
|
||||||
|
color: $brand-grey-light;
|
||||||
|
margin-top: $spacer / 2;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes spinner {
|
@keyframes spinner {
|
||||||
to {
|
to {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import styles from './Spinner.module.scss'
|
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
|
export default Spinner
|
||||||
|
Loading…
Reference in New Issue
Block a user