
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
react-native-counters-edit
Advanced tools
React native Minus(-) (Number) Plus(+) Component
To install a stable release use:
yarn add react-native-counters
npm i react-native-counters --save
Simple use only uses the Text plus minus component.
import Counter from "react-native-counters";
class Example Component {
onChange(number, type) {
console.log(number, type) // 1, + or -
}
render() {
return (
<Counter start={1} onChange={this.onChange.bind(this)} />
)
}
}
For all uses ALL_USES
If you want to customize (minusIcon, plusIcon)
the buttons USE_CUSTOM_ICON
Some default props and descriptions.
PropName | Description | type | Default |
---|---|---|---|
minus | If you are not using minusIcon, it shows directly. | String | - |
plus | If you are not using plusIcon, it shows directly. | String | + |
start | The starting number | Number | 0 |
min | Minus the minimum selected number. | Number | 0 |
max | The most selectable number. | Number | 10 |
minusIcon | You can use it to change the minusIcon. | Function | null |
plusIcon | You can use it to change the plusIcon. | Function | null |
buttonStyle | You can change the types of all buttons. | Object | {} |
buttonTextStyle | Minus or plus styles in the button | Object | {} |
countTextStyle | styles of increasing number. | Object | {} |
This project exists thanks to all the people who contribute.
FAQs
React native Minus(-) (Number) Plus(+) Component
We found that react-native-counters-edit 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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.