Get Started Component
The GetStarted component is a part of the Quest Labs React Native SDK. It provides a quick start guide for users to explore and engage with Application.
Last updated
npm install @questlabs/react-native-sdkimport { QuestProvider } from '@questlabs/react-sdk';import { useGetStarted, GetStarted } from "@questlabs/react-native-sdk";styleConfig {
Form?: ViewStyle;
Heading?: TextStyle;
Description?: TextStyle;
PrimaryButton?: ViewStyle | TextStyle;
SecondaryButton?: ViewStyle | TextStyle;
Footer?: {
FooterStyle?: ViewStyle;
FooterText?: TextStyle;
FooterIcon?: TextStyle;
};
Card?: ViewStyle;
ProgressBar?: {
barColor?: string;
ProgressText?: string;
barParentColor?: string;
};
CardContainer?: ViewStyle;
Icon?: ViewStyle;
TopBar?: ViewStyle;
Arrow?: {
Background?: string;
IconColor?: string;
CompletedBackground?: string;
CompletedIconColor?: string;
};
}import { SafeAreaView, StyleSheet, StatusBar } from "react-native";
import React, { useState } from "react";
import { QuestProvider } from "@questlabs/react-native-sdk";
import DemoComponent from "./DemoComponent";
export default function App() {
return (
<SafeAreaView style={styles.container}>
<StatusBar />
<QuestProvider
apiKey="Your-Api-Key"
apiSecret="Your-Api-Secret"
entityId="Your-Api-entityId"
authenticationToken="Your-authentication-token"
fontFamily= "Your-Font-FamFamily"
>
<DemoComponent />
</QuestProvider>
</SafeAreaView>
);
}import React from "react";
import {GetStarted,useGetStarted} from "@questlabs/react-native-sdk";
const DemoComponent = () => {
// const getStarted = useGetStarted({
// questId: "Your-Quest_ID" ,
// userId:"5235trfet365try67ywry5"
// })
const getStarted = useGetStarted({
questId: "Your-Quest_ID" ,
questUserId: "Your-user-id",
questToken: "Your-Token-id"
});
return (
<>
<GetStarted
actions={getStarted.actions}
// actions={[
// {
// actionId: "123",
// completed: false,
// description: 'first description',
// imageUrl: "url",
// postlink: "https://google.com",
// title: 'first title',
// buttonText: 'start',
// demoButtonText: 'demo visit',
// demoLink: "https://zoho.com"
// },
// {
// actionId: "456",
// completed: false,
// description: '2nd description',
// imageUrl: "url",
// postlink: "https://facebook.com",
// title: '2nd title',
// buttonText: 'facebook',
// demoButtonText: 'demo visit',
// demoLink: "https://clickup.com"
// },
// {
// actionId: "4356",
// completed: false,
// description: '3nd description',
// imageUrl: "url",
// postlink: "https://facebook.com",
// title: '2nd title',
// buttonText: 'facebook',
// demoButtonText: 'demo visit',
// demoLink: "https://clickup.com"
// },
// {
// actionId: "4546",
// completed: false,
// description: '24nd description',
// imageUrl: "url",
// postlink: "https://facebook.com",
// title: '24nd title',
// buttonText: 'facebook',
// demoButtonText: 'demo visit',
// demoLink: "https://clickup.com"
// },
// ]}
description={getStarted.description}
loading={getStarted.loading}
questId={getStarted.questId}
title={getStarted.title}
userToken={getStarted.userToken}
questUserId={getStarted.questUserId}
showDetailed={false}
campaignVariationId={getStarted.campaignVariationId}
ButtonType="Arrow"
showProgressBar={true}
showFooter={true}
isModal={true}
// onClick={() => console.log(" click")}
// onClose={() => console.log('close')}
// styleConfig={{
// Card: {
// backgroundColor: 'lightgray'
// },
// CardContainer: {
// backgroundColor: "red"
// },
// Heading: {
// color: "blue"
// },
// Description: {
// color: "red"
// },
// Form: {
// backgroundColor: "yellow"
// },
// Arrow: {
// Background: "yellow",
// CompletedBackground: "blue",
// CompletedIconColor: "white",
// IconColor: "red"
// },
// Footer: {
// FooterIcon: {
// color: "red"
// },
// FooterStyle: {
// backgroundColor: "orange"
// },
// FooterText: {
// color: "blue"
// },
// },
// Icon: {
// backgroundColor: "red"
// },
// PrimaryButton: {
// },
// ProgressBar: {
// },
// SecondaryButton: {
// },
// TopBar: {
// }
// }}
/>
</>
);
};
export default DemoComponent;