DefinitelyTyped/types/react-native-input-spinner/index.d.ts
mkrishnan-codes 74a8df8b7f
Added definitions for react-native-input-spinner (#43678)
* lint and config added

* input spinner typings added

* test file added

* updated with semi colons

* version fix

* version test fix
2020-04-06 13:47:40 -07:00

59 lines
1.9 KiB
TypeScript

// Type definitions for react-native-input-spinner 1.2
// Project: https://github.com/marcocesarato/react-native-input-spinner#readme
// Definitions by: Manu Krishnan <https://github.com/mkrishnan-codes>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import { Component } from 'react';
import { StyleProp, ViewStyle } from 'react-native';
export interface ReactNativeInputSpinnerProps {
type?: 'int' | 'float';
min?: string | number;
max?: string | number;
value?: string | number;
step?: string | number;
precision?: number;
rounded?: boolean;
activeOpacity?: number;
color?: string;
colorPress?: string;
colorRight?: string;
colorLeft?: string;
colorMax?: string;
colorMin?: string;
background?: string;
textColor?: string;
arrows?: boolean;
showBorder?: boolean;
fontSize?: number;
fontFamily?: string;
buttonFontSize?: number;
buttonFontFamily?: string;
buttonTextColor?: string;
disabled?: boolean;
editable?: boolean;
width?: string | number;
height?: string | number;
onChange?: (val?: any) => any;
onMin?: (val: any) => any;
onMax?: (val: any) => any;
onIncrease?: (val: any) => any;
onDecrease?: (val: any) => any;
buttonLeftDisabled?: boolean;
buttonRightDisabled?: boolean;
buttonLeftText?: string;
buttonRightText?: string;
buttonLeftImage?: React.ReactElement;
buttonRightImage?: React.ReactElement;
buttonPressLeftImage?: React.ReactElement;
buttonPressRightImage?: React.ReactElement;
buttonStyle?: StyleProp<ViewStyle>;
buttonPressStyle?: StyleProp<ViewStyle>;
inputStyle?: StyleProp<ViewStyle>;
style?: StyleProp<ViewStyle>;
append?: React.ReactElement;
prepend?: React.ReactElement;
}
export default class InputSpinner extends Component<ReactNativeInputSpinnerProps> { }