Open Monir-Shembesh opened 4 years ago
Cool, thanks! If you still wish to merge this, please add the new props to README
Thanks a lot for your contribution!
Hi, yes please merge it i have updated the README, revised the code, as well as fixed a typo in the types file.
@himelbrand can you please merge this pull request?
I'll review it this weekend, I missed the notification sorry
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
anddecrement
buttons when the user reaches themax
ormin
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 thestyle
prop on theincrement
anddecrement
to be an array 3- spread the upcoming props that are related to the button styles iftrue
other wise just use{}
4- add adisabled
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 propsdisableIncButtonOnMaxReach
anddisableDecButtonOnMaxReach
Happy to make any necessary changes after reviewing