UNPKG

react-native-counter-input

Version:

Counter Input with fully customizable options for React Native

25 lines (24 loc) 841 B
import * as React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; type CustomStyleProp = StyleProp<ViewStyle> | Array<StyleProp<ViewStyle>>; export interface CounterInputProps { style?: CustomStyleProp; initial?: number; ImageComponent?: any; horizontal?: boolean; backgroundColor?: string; increaseButtonBackgroundColor?: string; decreaseButtonBackgroundColor?: string; width?: number; height?: number; min?: number; max?: number; borderRadius?: number; reverseCounterButtons?: boolean; onIncreasePress?: (counter: number) => void; onDecreasePress?: (counter: number) => void; onChangeText?: (counter: number | string) => void; onChange: (counter: number) => void; } declare const CounterInput: React.FC<CounterInputProps>; export default CounterInput;