react-native-rounded-checkbox
Version:
Rounded Checkbox with animated and fully customizable options library for React Native
28 lines (27 loc) • 947 B
TypeScript
import * as React from "react";
import { ViewStyle, TextStyle, StyleProp } from "react-native";
declare type CustomViewStyleProp = StyleProp<ViewStyle> | Array<StyleProp<ViewStyle>>;
declare type CustomTextStyleProp = StyleProp<TextStyle> | Array<StyleProp<TextStyle>>;
export interface IRoundedCheckboxProps {
text?: string;
active?: boolean;
isChecked?: boolean;
checkedColor?: string;
uncheckedColor?: string;
checkedTextColor?: string;
children?: React.ReactNode;
uncheckedTextColor?: string;
textStyle?: CustomTextStyleProp;
outerStyle?: CustomViewStyleProp;
innerStyle?: CustomViewStyleProp;
onPress?: (checked: boolean) => void;
}
interface IState {
checked: boolean;
}
export default class PureRoundedCheckbox extends React.PureComponent<IRoundedCheckboxProps, IState> {
constructor(props: IRoundedCheckboxProps);
handlePress: () => void;
render(): JSX.Element;
}
export {};