Spotlight Searc
Installation
To install the Quest react-native-sdk
into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the
cd
command if you're not already there.Run the following command to install the
quest-sdk
package using npm:
This command will download and install the package and its dependencies into your project.
Make sure your project has npm and Node.js installed, and that you have the necessary permissions to install packages in your project directory.
Usage
Root Component
Import the QuestProvider Component: Import the
QuestProvider
component from the@questlabs/react-sdk
package.
Pass the Required Props: Pass the required props to the
QuestProvider
. The required props areapiKey
,apiSecret
,entityId
andauthenticationToken.
Component Usage
To integrate the SearchBar
component into your React native application, follow these steps.
Import useSearchBar Hook: Import the
useSearchBar
component from the@questlabs/react-sdk
package.Import the SearchBar Component: Import the
QuestList
component from the@questlabs/react-sdk
package.Pass the Required Props: Pass the required props to the
useSearchBar
. The required props arequestId
,questUserId
, anduserToken
or if user don't have quest User id then they can pass own userId to get questUserId and Token.
Don't not use QuestProvider and useSearchBar Hook in same file
Props of SearchBar Component
The SearchBar component accepts the following props
actions
ICriteria[]
Require
In offline user need to provide the require filed data.
loading
boolean
optional
don't use in offline mode.
onError
Function
optional
For Showing the Error.
visible
boolean
Require
To show the component as modal
setVisible
Function
Require
Create a fucntion for close comopnent
styleConfig
styleConfig
optional
An object containing Styling properties for styling various components within the get started process, including form, topbar, headings, descriptions, and buttons.
Style Props
Example Usage
App.js
DemoComponent.tsx
Demo
Last updated