Skip to content

v4.0.0

Compare
Choose a tag to compare
@testshallpass testshallpass released this 26 Mar 20:29
· 10 commits to main since this release

This has been refactored as a functional Typescript component. In addition, consolidated the ImageView and Step components into the parent component. Furthermore, the ability to control color easily was implemented, see new props useColor and color, as a result several styles were changed and default color scheme is black to match the default image colors.

Breaking changes

  • textStyle defaults changed to {marginHorizontal: 8, fontSize 24}.
  • containerStyle defaults changed to {flexDirection: 'row', borderWidth: 1, borderRadius: 8, alignItems: 'center',justifyContent: 'space-evenly'}
  • separatorStyle's default backgroundColor change to black.
  • Both incrementStepStyle and decrementStepStyle's padding changed to 4.
  • Both incrementImageStyle and decrementImageStyle height and width changed to 30.
  • renderText passed arguments changed to value number.
  • renderDecrementStep passed arguments changed to value number and onDecrement function.
  • renderIncrementStep passed arguments changed to value number and onIncrement function.
  • renderDecrementImage passed arguments changed to opacity number.
  • renderIncrementImage passed arguments changed to opacity number.

New

  • disableIncrementImageTintColor as name implies, defaults to false.
  • disableDecrementImageTintColor as name implies, defaults to false.
  • useColor defaults to false and works in-conjunction with color to apply a color to the stepper styles.
  • color defaults to blue and works in-conjunction with useColor to apply color to containerStyle's border color, separatorStyle's backgroundColor, incrementImageStyle's tintColor, decrementImageStyle's tintColor and textStyle's color if showText enabled.
  • textDecimalPlaces defaults to 2 and formats the value number when showText is enabled and is not an integer.