Releases: testshallpass/react-native-simple-stepper
Releases · testshallpass/react-native-simple-stepper
v4.0.1
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.
3.0.3
3.0.2
3.0.1
- React has deprecated
componentWillRecieveProp
life cycle method so I added prefixUNSAFE
to adhere to warning.
3.0.0
Changelog
BREAKING CHANGES
tintColor
has been removed.backgroundColor
has been removed.padding
has been removed.tintOnIncrementImage
has been removed.tintOnDecrementImage
has been removed.renderIncrement
has been replaced by combination of render functions.renderDecrement
has been replaced by combination of render functions.imageHeight
has been removed.imageWidth
has been removed.
See props for replacements and style objects.
FEATURES
- Added text component that can be shown to display the value in the SimpleStepper. (try
showText
andtextPosition
). - Added functions
onMin
andonMax
to callback when value reaches min or max. - Added functions
onIncrement
andonDecrement
to callback when value increments or decrements. - Added style props to help customization.
- Added render functions to help flexibility.
2.1.3
2.1.1
- Fix initialValue not changing on first render.
2.1.0
2.0.0
To use 2.0.0 and beyond please update your import to:
import { SimpleStepper } from 'react-native-simple-stepper';
I refactored the internals with the following improvements and updates:
- smaller components
- remove @1x assets
- improve readability of update props
- update demo
- update usage
- move away from unnecessary state variables value and stepValue
- move everything into src directory