diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-02-14 15:48:34 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-02-14 15:54:54 +0100 |
| commit | 1b34f85f0e3188861c6804666f02b4495cab033c (patch) | |
| tree | 0f26c9b73b8cc47c7136bad6167a0f18a08fd835 /src/components/Spinner/Spinner.tsx | |
| parent | 637350e4d152de1346857d645bda8443900ec6f4 (diff) | |
chore: improve comment form user experience
Diffstat (limited to 'src/components/Spinner/Spinner.tsx')
| -rw-r--r-- | src/components/Spinner/Spinner.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/Spinner/Spinner.tsx b/src/components/Spinner/Spinner.tsx index 381fbb6..afe86f6 100644 --- a/src/components/Spinner/Spinner.tsx +++ b/src/components/Spinner/Spinner.tsx @@ -1,7 +1,7 @@ import { useIntl } from 'react-intl'; import styles from './Spinner.module.scss'; -const Spinner = () => { +const Spinner = ({ message }: { message?: string }) => { const intl = useIntl(); return ( @@ -10,10 +10,11 @@ const Spinner = () => { <div className={styles.ball}></div> <div className={styles.ball}></div> <div className={styles.text}> - {intl.formatMessage({ - defaultMessage: 'Loading...', - description: 'Spinner: loading text', - })} + {message || + intl.formatMessage({ + defaultMessage: 'Loading...', + description: 'Spinner: loading text', + })} </div> </div> ); |
