serotonin-survey
v1.2.8
Published
```bash npm i serotonin-survey ```
Readme
Survey SDK
Installation
npm i serotonin-surveyUsage
import { Survey, openSurvey } from 'serotonin-survey'
// Add the Survey component to your app
<Survey
config={{
clientId: "YOUR_CLIENT_ID",
gqlEndpoint: "GRAPHQL_ENDPOINT",
theme: {
primary: "#000",
secondary: "#fff",
background: "#fff",
}
}}
className="optional-custom-class"
buttonClassName="optional-button-class"
/>
// Use the openSurvey function anywhere in your app to show the survey
<button onClick={openSurvey}>Open Survey</button>