marcocesarato / react-native-input-spinner

An extensible input number spinner component for react-native highly customizable. This component enhance a text input for entering numeric values, with increase and decrease buttons.
https://marcocesarato.github.io/react-native-input-spinner/
GNU General Public License v3.0
414 stars 34 forks source link

feat: Support button Text props #56

Closed ws333 closed 3 years ago

ws333 commented 3 years ago

Hi,

thanks for maintaining this useful component!

I added support for passing props to the button Text component It supports code completion as buttonTextProps is typed as TextProps I can also help update the README if you find this PR useful and plan to merge it

I needed this since devices using font scaling caused the - and + in the InputSpinner buttons to look weird

Example:

      <InputSpinner
        value={valueState}
        onChange={handleOnChange}
        buttonTextProps={{ maxFontSizeMultiplier: 1 }}
      />
marcocesarato commented 3 years ago

Hi @ws333, thanks for your pull request is much apreciated. Merged and released on v1.7.11.

ws333 commented 3 years ago

Thanks @marcocesarato, that was quick! It's a joy to contribute to the open souce community.