mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: fix a bunch of bugs.
This commit is contained in:
27
client/src/components/NProgress/Progress.js
Normal file
27
client/src/components/NProgress/Progress.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { useNProgress } from '@tanem/react-nprogress'
|
||||
import PropTypes from 'prop-types'
|
||||
import React from 'react'
|
||||
import Bar from './Bar'
|
||||
import Container from './Container'
|
||||
import Spinner from './Spinner'
|
||||
|
||||
const Progress = ({
|
||||
isAnimating,
|
||||
minimum = 0.2
|
||||
}) => {
|
||||
const { animationDuration, isFinished, progress } = useNProgress({
|
||||
isAnimating, minimum,
|
||||
});
|
||||
|
||||
return (
|
||||
<Container isFinished={isFinished} animationDuration={animationDuration}>
|
||||
<Bar progress={progress} animationDuration={animationDuration} />
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
Progress.propTypes = {
|
||||
isAnimating: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
export default Progress;
|
||||
Reference in New Issue
Block a user