React Native Simple Stepper Versions Save

A parity version of the iOS UIStepper.

v4.0.1

1 year ago
  • Update npmignore to exclude RELEASE_NOTES.md and .gitattributes files.

v4.0.0

1 year ago

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.

3.0.3

3 years ago

Changelog

FIXES

  • Add typescript definitions to get rid of warnings #31

3.0.2

3 years ago

Changelog

FIXES

  • Fix #32 by changing oneOfType to oneOf. Thanks @jossydeleon

3.0.1

4 years ago
  • React has deprecated componentWillRecieveProp life cycle method so I added prefix UNSAFE to adhere to warning.

3.0.0

4 years ago

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 and textPosition).
  • Added functions onMin and onMax to callback when value reaches min or max.
  • Added functions onIncrement and onDecrement to callback when value increments or decrements.
  • Added style props to help customization.
  • Added render functions to help flexibility.

2.1.3

5 years ago
  • Remove and ignore coverage directory. Thanks @iRoachie
  • Fix style prop warning on Step component. Thanks @iRoachie

2.1.1

5 years ago
  • Fix initialValue not changing on first render.

2.1.0

5 years ago
  • Fix #23 remove usage of obsolete state variable value.
  • Fix #24 where valueChanged was invoked on initial render.

2.0.0

5 years ago

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