Skip to content

feat: add "config.step" prop #788

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

Closed
wants to merge 2 commits into from
Closed

feat: add "config.step" prop #788

wants to merge 2 commits into from

Conversation

aleclarson
Copy link
Contributor

@aleclarson aleclarson commented Aug 20, 2019

This rounds the animated value to the nearest step.

For example, passing 10 as the step would round to the nearest multiple of 10.

Likewise, passing 0.5 would round to the nearest multiple of 0.5.

The most common use case will probably be rounding based on pixel density.

This is a bug in TypeScript that manifests in @types/react.

This commit is temporary pain relief for #613. The "ref" prop is no longer typed.

More info here: microsoft/TypeScript#29949
This rounds the animated value to the nearest step.

For example, passing `10` as the step would round to the nearest multiple of 10.

Likewise, passing `0.5` would round to the nearest multiple of 0.5.
@aleclarson
Copy link
Contributor Author

Merged into #808

@aleclarson aleclarson closed this Sep 19, 2019
@aleclarson aleclarson deleted the step-prop branch February 23, 2021 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant