@questlabs/react-native-sdk
Version:
Quest react native sdk
84 lines (79 loc) • 2.37 kB
text/typescript
import { TextStyle, ViewStyle } from "react-native";
export type Props = {
campaignVariationId?: string;
questId?: string;
questUserId?: string;
userToken?: string;
// style?: styles;
actions: ICriteria[];
loading?: boolean;
onUpdateAction?: (actionID: string, answer: (string | number)[]) => void;
header?: string;
onError?: (
event : "VERIFY_ACTION",
message: string,
data?: {}
) => void;
styleConfig?: styleConfig;
};
export interface ICriteria {
actionId: string;
title: string;
actionType: string;
answer: (string | number)[];
options?: (string | number)[];
}
export interface styleConfig {
Form?: ViewStyle;
Heading?: TextStyle;
// Description: TextStyle,
Input?: ViewStyle;
PrimaryButton?: ViewStyle | TextStyle;
SecondaryButton?: ViewStyle | TextStyle;
Footer?: {
FooterStyle?: ViewStyle;
FooterText?: TextStyle;
FooterIcon?: TextStyle;
};
MultiChoice?: {
style?: TextStyle ,
selectedStyle?: ViewStyle
},
// ComponentTheme: ViewStyle,
FormContainer?: ViewStyle;
Question?: TextStyle;
ThanksPopup?: ViewStyle;
ThanksPopupHeading?: TextStyle;
ThanksPopupDescription?: TextStyle;
thanksPopUpFooter?: {
thanksPopUpFooterStyle?: ViewStyle;
thanksPopUpFooterText?: TextStyle;
thanksPopUpFooterIcon?: TextStyle;
};
ThanksPopupGotoHome?: ViewStyle | TextStyle;
OptionsSelectedColor?: ViewStyle;
}
// export interface styles {
// mainModalContainer?: ViewStyle;
// mainViewStyle?: ViewStyle;
// headerTextStyle?: TextStyle;
// iconBackgroundView?: ViewStyle;
// questionBackgroundViewStyle?: ViewStyle;
// questionHeaderTextStyle?: TextStyle;
// questionTextStyle?: TextStyle;
// optionsViewStyle?: ViewStyle;
// optionTextStyle?: TextStyle;
// buttonViewStyle?: ViewStyle;
// cancelButtonViewStyle?: ViewStyle;
// nextButtonViewStyle?: ViewStyle;
// footerViewStyle?: ViewStyle;
// footerTextStyle?: TextStyle;
// successFooterViewStyle?: ViewStyle;
// successFooterTextStyle?: TextStyle;
// submitButtonViewStyle?: ViewStyle;
// submitButtonTextStyle?: TextStyle;
// successHeaderTextStyle?: TextStyle;
// successDescriptionTextStyle?: TextStyle;
// successModalViewStyle?: ViewStyle;
// inputViewStyle?: ViewStyle;
// }