@staircase/persistence-widget
v0.4.0
Published
Provides React components to use. Uploads a couple of any files to Staircase Persistence Blobs
Downloads
19
Keywords
Readme
Staircase Widget app
Provides React components to use. Uploads a couple of any files to Staircase Persistence Blobs
Install
npm
npm install @staircase/persistence-widget
yarn
yarn add @staircase/persistence-widget
Examples of usage
Note, get token
endpoint WIP
JS
import { renderPersistenceWidget } from '@staircase/persistence-widget'
const token = "YOUR_TOKEN"
renderPersistenceWidget(document.getElementById('root'), token, ()=>{console.log("Widget worked"), ()=>{console.log("Widget Error")}})
React
import { PersistenceWidget } from '@staircase/persistence-widget'
const token = "YOUR_TOKEN"
const App = () => {
return <PersistenceWidget token={token} onComplete={() => {console.log("Widget worked")}} onError={()=>{}}/>
}