UNPKG

qvt-components

Version:

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

55 lines (54 loc) 1.99 kB
import { Component } from 'react'; import { TextStyle, RegisteredStyle, ImageStyle, ViewStyle } from 'react-native'; export interface ISwitchSelectorOption { label: string; value: string | number; customIcon?: JSX.Element; imageIcon?: string; activeColor?: string; accessibilityLabel?: string; testID?: string; } export interface ISwitchSelectorProps { options: ISwitchSelectorOption[]; initial?: number; value?: number; onPress(value: string | number | ISwitchSelectorOption): void; fontSize?: number; selectedColor?: string; buttonMargin?: number; buttonColor?: string; textColor?: string; backgroundColor?: string; borderColor?: string; borderRadius?: number; hasPadding?: boolean; animationDuration?: number; valuePadding?: number; height?: number; bold?: boolean; textStyle?: TextStyle; selectedTextStyle?: TextStyle | RegisteredStyle<TextStyle>; textCStyle?: TextStyle | RegisteredStyle<TextStyle>; selectedTextContainerStyle?: TextStyle | RegisteredStyle<TextStyle>; imageStyle?: ImageStyle | RegisteredStyle<ImageStyle>; style?: ViewStyle | RegisteredStyle<ViewStyle>; returnObject?: boolean; disabled?: boolean; disableValueChangeOnPress?: boolean; accessibilityLabel?: string; testID?: string; textContainerStyle: TextStyle; borderWidth: number; } export default class SwitchSelector extends Component<ISwitchSelectorProps> { constructor(props: ISwitchSelectorProps); componentDidUpdate(prevProps: any): void; getSwipeDirection(gestureState: any): "RIGHT" | "LEFT" | null; getBgColor(): string | undefined; responderEnd: (evt: any, gestureState: any) => void; shouldSetResponder: (evt: any, gestureState: any) => boolean; animate: (value: any, last: any) => void; toggleItem: (index: any, callOnPress?: boolean) => void; render(): JSX.Element; }