Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
react-native-simple-stepper
Advanced tools
A super simple react-native implementation of the UIStepper from iOS.
A super simple react-native implementation of the UIStepper control from iOS.
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 (like the demo).
const nextValue = Number(value.toFixed(2));
this.setState({ value: nextValue });
// ...
}
render() {
const { value } = this.state;
return <SimpleStepper value={value} valueChanged={value => this.valueChanged(value)} />;
}
}
Name | Type | Description | Default |
---|---|---|---|
value | Number | stepper's value | 0 |
initialValue | Number | initial value | 0 |
minimumValue | Number | minimum value | 0 |
maximumValue | Number | maximum value | 10 |
stepValue | Number | step value (i.e. increment by 10) | 1 |
backgroundColor | String | background color | transparent |
tintColor | String | color for border, divider and images | blue |
padding | Number | stepper padding | 4 |
valueChanged | Function | Fires when the value changes and the value will be passed down for processing like display or calculations | null |
incrementImage | String or Number | network or local image | require('./assets/increment.png') |
decrementImage | String or Number | network or local image | require('./assets/decrement.png') |
tintOnIncrementImage | Boolean | whether or not you want tintColor applied to increment image | true |
tintOnDecrementImage | Boolean | whether or not you want tintColor applied to decrement image | true |
imageHeight | Number | network image height | 36 |
imageWidth | Number | network image width | 36 |
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 |
renderIncrement | Function | render increment component(s) | null |
renderDecrement | Function | render decrement component(s) | null |
FAQs
A parity version of the iOS UIStepper.
The npm package react-native-simple-stepper receives a total of 36 weekly downloads. As such, react-native-simple-stepper popularity was classified as not popular.
We found that react-native-simple-stepper 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.