Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add delay prop #2

Open
tomcru opened this issue Dec 10, 2023 · 0 comments · May be fixed by #38
Open

feat: add delay prop #2

tomcru opened this issue Dec 10, 2023 · 0 comments · May be fixed by #38
Assignees

Comments

@tomcru
Copy link
Owner

tomcru commented Dec 10, 2023

Add a prop like delay={200} with a time in ms
The progress bar only starts if no navigation happened within this delay

@tomcru tomcru self-assigned this Feb 3, 2024
hootanht added a commit to hootanht/holy-loader that referenced this issue Nov 16, 2024
Fixes tomcru#2

Add delay prop to HolyLoader component to delay the start of the progress bar.

* Add `delay` prop to `HolyLoaderProps` interface in `src/index.tsx` with a default value of 0.
* Modify `HolyLoader` component in `src/index.tsx` to use the `delay` prop to delay the start of the progress bar.
* Update `useEffect` hook in `src/index.tsx` to handle the delay logic before starting the progress bar.
* Add documentation for the new `delay` prop in the API section of `README.md`.
* Add tests in `src/__tests__/HolyLoader.test.ts` to verify the functionality of the `delay` prop.
@hootanht hootanht linked a pull request Nov 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant