41 lines
1.0 KiB
TypeScript
41 lines
1.0 KiB
TypeScript
import { Component, ReactElement } from 'react';
|
|
import { ViewStyle } from 'react-native';
|
|
export interface RateProps {
|
|
style?: ViewStyle;
|
|
value?: number;
|
|
total?: number;
|
|
icons?: {
|
|
empty: ReactElement<any>;
|
|
full: ReactElement<any>;
|
|
half?: ReactElement<any>;
|
|
};
|
|
iconSize?: number;
|
|
iconSpace?: number;
|
|
iconColor?: string;
|
|
enableHalf?: boolean;
|
|
onChange?: Function;
|
|
}
|
|
export declare class Rate extends Component<RateProps, any> {
|
|
static defaultProps: {
|
|
total: number;
|
|
icons: {
|
|
empty: JSX.Element;
|
|
full: JSX.Element;
|
|
half: JSX.Element;
|
|
};
|
|
iconSize: number;
|
|
iconSpace: number;
|
|
enableHalf: boolean;
|
|
iconColor: any;
|
|
};
|
|
private panResponder;
|
|
private containerView;
|
|
constructor(props: any);
|
|
validateProps(props: any): void;
|
|
render(): JSX.Element;
|
|
renderIcons(value: any): any[];
|
|
getValue(pageX: any): any;
|
|
handleChange(value: any): void;
|
|
createPanResponder(): void;
|
|
}
|