-
Notifications
You must be signed in to change notification settings - Fork 46
/
index.d.ts
45 lines (37 loc) · 1.12 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
declare module 'react-native-rating-requestor' {
import { Component } from 'react'
import { StyleProp, ViewStyle } from 'react-native'
enum buttonTypes {
NEUTRAL_DELAY = 'NEUTRAL_DELAY',
NEGATIVE_DECLINE = 'NEGATIVE_DECLINE',
POSITIVE_ACCEPT = 'POSITIVE_ACCEPT',
}
type UserDecisions = 'decline' | 'delay' | 'accept'
type RatingCallback = (didAppear: boolean, userDecision:UserDecisions) => void
interface Options {
title?: string,
message?: string,
actionLabels?: {
decline: string;
delay: string;
accept: string;
},
buttonOrder?: {
ios: [buttonTypes, buttonTypes, buttonTypes];
android: [buttonTypes, buttonTypes, buttonTypes];
},
shouldBoldLastButton?: boolean,
storeAppName?: string,
storeCountry?: string,
timingFunction?: (currentCount: number) => boolean
}
interface Props {
platform: string,
options?: Options
}
export default class RatingRequestor {
constructor(platform: string, options?:Options)
handlePositiveEvent(callback?:RatingCallback): void
showRatingDialog(callback?:RatingCallback): void
}
}