diff options
| author | Haishan <[email protected]> | 2018-10-30 23:37:42 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2018-11-03 23:06:16 +0800 |
| commit | 7f75345c03c21336cff68370eede0879c6bdf6ab (patch) | |
| tree | 3d63e5e503857f09039d680e34cd987f830427f9 /src/components/Loading.js | |
| parent | d247e37890de06b17da34646c0fe227a9b6ef2a6 (diff) | |
refactor(chart): lazy load Chart.js with suspense
- chore: add ico favicon
- chore: lint
- chore: add react-hooks lint rules
Diffstat (limited to 'src/components/Loading.js')
| -rw-r--r-- | src/components/Loading.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/components/Loading.js b/src/components/Loading.js index 1b8d373..7949a4b 100644 --- a/src/components/Loading.js +++ b/src/components/Loading.js @@ -1,14 +1,19 @@ import React from 'react'; +import PropTypes from 'prop-types'; -import style from './Loading.module.scss'; +import s0 from './Loading.module.scss'; -const Loading = () => { +const Loading = ({ height }) => { + const style = height ? { height } : {}; return ( - <div className={style.loading}> - <div className={style.left + ' ' + style.circle} /> - <div className={style.right + ' ' + style.circle} /> + <div className={s0.loading} style={style}> + <div className={s0.pulse} /> </div> ); }; +Loading.propTypes = { + height: PropTypes.string +}; + export default Loading; |
