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: ability to customize SelectionDot component #35

Merged
merged 3 commits into from
Aug 30, 2022
Merged

feat: ability to customize SelectionDot component #35

merged 3 commits into from
Aug 30, 2022

Conversation

robinvw1
Copy link
Contributor

@robinvw1 robinvw1 commented Jul 27, 2022

Description

The current selection dot is 'design-wise' quite opinionated. It has a light shadow and an outer ring.

Instead of introducing a lot of new props (no offence #21) to customize the look-and-feel of the selection dot, I went for a flexible way to provide your own SelectionDot component.

Demo

Default situation With custom selection dot
Simulator.Screen.Recording.-.iPhone.13.-.2022-07-27.at.15.59.11.mp4
Simulator.Screen.Recording.-.iPhone.13.-.2022-07-27.at.15.58.39.mp4

Copy link
Member

@mrousavy mrousavy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for your PR! Looks pretty good in general! Just left two comments (questions)

Comment on lines +27 to +32
runSpring(circleRadius, active ? 5 : 0, {
mass: 1,
stiffness: 1000,
damping: 50,
velocity: 0,
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd move that into the useAnimatedReaction, no need to add an extra callback here

src/AnimatedLineGraph.tsx Outdated Show resolved Hide resolved
@mrousavy mrousavy merged commit 9d66c44 into margelo:main Aug 30, 2022
@mrousavy
Copy link
Member

LGTM thank you!

@robinvw1 robinvw1 deleted the feature/custom-selectiondot-component branch August 30, 2022 18:08
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.

None yet

2 participants