UNPKG

react-native-bouncy-checkbox

Version:

Fully customizable animated bouncy checkbox for React Native

41 lines (40 loc) 1.14 kB
import * as React from "react"; import { Animated, TouchableOpacityProps } from "react-native"; export interface ISource { source: string | { uri: string; }; } export interface IBouncyCheckboxProps extends TouchableOpacityProps { style?: any; size?: number; text?: string; iconStyle?: any; textStyle?: any; fillColor?: string; iconComponent?: any; isChecked?: boolean; unfillColor?: string; disableText?: boolean; ImageComponent?: any; iconImageStyle?: any; bounceEffect?: number; bounceFriction?: number; useNativeDriver?: boolean; disableBuiltInState?: boolean; checkIconImageSource?: ISource; onPress: (isChecked?: boolean) => void; } interface IState { checked: boolean; springValue: Animated.Value; } declare class BouncyCheckbox extends React.Component<IBouncyCheckboxProps, IState> { constructor(props: IBouncyCheckboxProps); componentDidMount(): void; onPress: () => void; renderCheckIcon: () => JSX.Element; renderCheckboxText: () => false | JSX.Element; render(): JSX.Element; } export default BouncyCheckbox;