![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-native-stepper-counter
Advanced tools
A super simple react-native implementation Stepper.If you have any thought of implementing Add To cart something like E-commerce apps or Food Apps, just give a try
A super simple react-native implementation of the UIStepper control from iOS with added customization and flexibility.
npm i react-native-simple-stepper --save
OR yarn add react-native-simple-stepper
import React, { Component } from 'react';
import { SimpleStepper } from 'react-native-simple-stepper';
export default class App extends Component {
constructor(props) {
super(props);
this.state = { value: 0 };
}
valueChanged(value) {
// Truncate value to 2 decimal places and cast as Number.
const nextValue = Number(value.toFixed(2));
this.setState({ value: nextValue });
// ...
}
render() {
return <SimpleStepper valueChanged={value => this.valueChanged(value)} />;
}
}
Name | Type | Description | Default |
---|---|---|---|
initialValue | Number | initial value | 0 |
minimumValue | Number | minimum value | 0 |
maximumValue | Number | maximum value | 10 |
stepValue | Number | step value (ex. increment by 10) | 1 |
incrementImage | String or Number | network or local image | require('./assets/increment.png') |
decrementImage | String or Number | network or local image | require('./assets/decrement.png') |
activeOpacity | Number | touch opacity | 0.4 |
disabledOpacity | Number | when step button is disabled | 0.5 |
disabled | Boolean | stepper disable state | false |
wraps | Boolean | whether or not it wraps. more info | false |
showText | Boolean | whether or not to show text component | false |
textPosition | String | placement of the text component | center |
Name | Type | Description | Default |
---|---|---|---|
valueChanged | Function | invoked when value changes | () => {} |
onMin | Function | invoked when value reaches min value | () => {} |
onMax | Function | invoked when value reaches min value | () => {} |
onIncrement | Function | invoked each time value increments | () => {} |
onDecrement | Function | invoked each time value decrements | () => {} |
renderDecrementImage | Function | used to override decrement image component | undefined |
renderIncrementImage | Function | used to override increment image component | undefined |
renderDecrementStep | Function | used to override decrement step component | undefined |
renderIncrementStep | Function | used to override increment step component | undefined |
renderText | Function | used to override increment text component | undefined |
Name | Type | Description | Default |
---|---|---|---|
textStyle | Object | text component style | { padding: 8, fontSize: 20, fontWeight: 'bold', color: 'blue' } |
containerStyle | Object | container component style | { backgroundColor: 'transparent', flexDirection: 'row', borderWidth: 2, borderRadius: 8, overflow: 'hidden', alignItems: 'center', borderColor: 'blue' } |
separatorStyle | Object | separator component style | { width: StyleSheet.hairlineWidth, backgroundColor: 'blue', height: '100%' } |
incrementStepStyle | Object | increment step component style | { padding: 8 } |
decrementStepStyle | Object | decrement step component style | { padding: 8 } |
incrementImageStyle | Object | increment image component styles | { height: 36, width: 36 } |
decrementImageStyle | Object | decrement image component styles | { height: 36, width: 36 } |
FAQs
A super simple react-native implementation Stepper.If you have any thought of implementing Add To cart something like E-commerce apps or Food Apps, just give a try
The npm package react-native-stepper-counter receives a total of 2 weekly downloads. As such, react-native-stepper-counter popularity was classified as not popular.
We found that react-native-stepper-counter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.