added value
prop to StepMarker
component prop
#598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Hello, thanks for the work on the library, it's great! I added a
value
prop to the recently addedStepMarker
prop. This allows developers to render StepMarker conditionally based on their value. This is a small change with a low service area but enables developers to implement features present in other slider libraries (sometimes calledmarks
)My other solution, which would be larger, was making the
StepNumber
component something that could be passed in. Happy to update my PR in that direction if that would be helpful!Test Plan:
This is a small change, doesn't change any external APIs, and passes all
npm test
s. I have tested it in a web and native app but thought I'd put together a PR to share the changes upstream. Let me know how I can be more helpful on this front!