web-react-sdk-link
v0.1.7
Published
Reusable auth form made by mehira
Downloads
1
Readme
Installation
npm i @mehira/web-react-sdk
How to use Auth Widget
- Import the Mehira provider and AuthComponent
import { AuthComponent, MehiraProvider } from '@mehira/web-react-sdk'
- Add them anywhere to your code provide your apiUrl, publicKey, and auth as shown below
<MehiraProvider.Provider
value={{
apiUrl: $yourApiUrl,
auth: {
enableGithubAuth: true,
enableGoogleAuth: true,
enableSlackAuth: true
},
publicKey:"test",
}}
>
<AuthComponent />
</MehiraProvider.Provider>
How to use lead generation widget
- Import the Mehira provider and AuthComponent
import { LeadGenerationWidget, MehiraProvider } from '@mehira/web-react-sdk'
- Add them anywhere to your code provide your apiUrl, publicKey, and auth, you can also provide headingText, headingSubText, emailPlaceholder, submitButtonText props for the leadGenerationWidget as shown below:
<MehiraProvider.Provider
value={{
apiUrl: "test",
publicKey:"test",
}}
>
<LeadGenerationWidget
headingText="Subscribe to our Email"
headingSubText="Get ahead of everyone else!"
/>
</MehiraProvider.Provider>