Provides React components to use.
npm install @staircase/partner-credentials-widget
yarn add @staircase/partner-credentials-widget
Note, to get token
use Staircase endpoint
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')
}
})
import { Widget } from '@staircase/partner-credentials-widget'
const token = "YOUR_TOKEN"
const App = () => {
return <Widget token={token} onComplete={() => {console.log("Widget worked")} onError={()=>{}} onClose={()=>{}} }/>
}