v4.0.0
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 toblack
.- Both
incrementStepStyle
anddecrementStepStyle
's padding changed to 4. - Both
incrementImageStyle
anddecrementImageStyle
height
andwidth
changed to 30. renderText
passed arguments changed tovalue
number.renderDecrementStep
passed arguments changed tovalue
number andonDecrement
function.renderIncrementStep
passed arguments changed tovalue
number andonIncrement
function.renderDecrementImage
passed arguments changed toopacity
number.renderIncrementImage
passed arguments changed toopacity
number.
New
disableIncrementImageTintColor
as name implies, defaults tofalse
.disableDecrementImageTintColor
as name implies, defaults tofalse
.useColor
defaults tofalse
and works in-conjunction withcolor
to apply a color to the stepper styles.color
defaults toblue
and works in-conjunction withuseColor
to apply color tocontainerStyle
's border color,separatorStyle
's backgroundColor,incrementImageStyle
's tintColor,decrementImageStyle
's tintColor andtextStyle
's color ifshowText
enabled.textDecimalPlaces
defaults to 2 and formats thevalue
number whenshowText
is enabled and is not an integer.