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.
Pull Request
Related Issue(s):
Changes Introduced
defaultValue
propertyvalue
from component state and make it a propertyREADME.md
to reflect the changes to props,README.md
into a markdown table for nicer formattingWhy were these changes made?
Hey @baderahmed,
I'm currently working on a project that requires custom styled switch components and your module is the best I've found for our needs. However, in this project we would like to control the state of these switches from a parent component. This PR introduces a change that moves the storage and control to the component's active/inactive state to it's props. This allows someone to control the active state of a switch from a parent component's state, or, in my case redux. This should also solve for the use case @rajesh1158 outlined in issue #3
Platforms affected
Documentation
The
README.md
file has been updated to reflect the changes in the properties