-
-
Notifications
You must be signed in to change notification settings - Fork 931
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(Loader): add paused
value to the speed
property to control the animation pause
#3875
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Someone is attempting to deploy a commit to the rsuite Team on Vercel. A member of the Team first needs to authorize it. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Hi @jpranays I suggest adding a // speed: 'fast' | 'normal' | 'slow' | 'paused'
<Loader speed="paused" /> |
Great idea! I’ll add paused to the speed prop. |
Also, remember to add a test case for this to ensure it works as expected. |
PR updated |
paused
value to the speed
property to control the animation pause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jietu20240710-121558-HD.mp4
The paused
value doesn't work, check your CSS specificity. You can add an example to the docs to preview it.
https://github.com/rsuite/rsuite/blob/main/docs/pages/components/loader/fragments/speed.md
And the documentation needs to be modified.
https://github.com/rsuite/rsuite/blob/main/docs/pages/components/loader/en-US/index.md#loader-1
https://github.com/rsuite/rsuite/blob/main/docs/pages/components/loader/zh-CN/index.md#loader
Seems strange, works fine for me, Rsuite-loader-doc.mp4Rsuite-loader-storybook.mp4Docs have been updated |
Rsuite-loader-latest-doc.mp4 |
It works now. It didn't work before because of browser cache. |
Description
This PR introduces a new
loaderPlayState
prop for the Loader spinner component. TheloaderPlayState
prop accepts two values:"running"
and"paused"
, allowing users to control the play state of the loader animation.Use Cases
Implementation Details
loaderPlayState
prop to the Loader component, which defaults to"running"
."running"
and"paused"
states appropriately."running"
so existing implementations are not affected.Code Example