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

Enable styles for buttons as well as enable disabling and enabling buttons #66

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Monir-Shembesh
Copy link

Sorry for the hassle of making one pull request to all features, but thought it would make sense.

I am currently working on a project and found out that I need to disable the increment and decrement buttons when the user reaches the max or min values specified.

Therefore, the following was done:

1- add expected props to the typescript interface following a previous name convention used with the icon styles
2- change the style prop on the increment and decrement to be an array
3- spread the upcoming props that are related to the button styles if true other wise just use {}
4- add a disabled prop to the buttons
5- write a condition inside the disabled prop that checks if the max/min reached as well if the user passed the disablers props disableIncButtonOnMaxReach and disableDecButtonOnMaxReach

Happy to make any necessary changes after reviewing

@himelbrand
Copy link
Owner

Cool, thanks!
If you still wish to merge this, please add the new props to README

@himelbrand
Copy link
Owner

Thanks a lot for your contribution!

@Monir-Shembesh
Copy link
Author

Hi, yes please merge it i have updated the README, revised the code, as well as fixed a typo in the types file.

@Monir-Shembesh
Copy link
Author

@himelbrand can you please merge this pull request?

@himelbrand
Copy link
Owner

I'll review it this weekend, I missed the notification sorry

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.

2 participants