@staircase/partner-credentials-widget
v1.0.8
Published
Provides React components to use.
Downloads
15
Keywords
Readme
Staircase Widget app
Provides React components to use.
Install
npm
npm install @staircase/partner-credentials-widget
yarn
yarn add @staircase/partner-credentials-widget
Examples of usage
Note, to get token
use Staircase endpoint
JS
import { renderWidget } from '@staircase/partner-credentials-widget'
const token = 'YOUR_TOKEN'
renderWidget(document.getElementById('root'), token, () => {
console.log('Widget worked'),
() => {
console.log('Widget Error')
},
() => {
console.log('Widget modal closed')
}
})
React
import { Widget } from '@staircase/partner-credentials-widget'
const token = "YOUR_TOKEN"
const App = () => {
return <Widget token={token} onComplete={() => {console.log("Widget worked")} onError={()=>{}} onClose={()=>{}} }/>
}