open-index/open-npm huggingface dataset:
npm package: @staircase/partner-credentials-widget
Description: Provides React components to use.
Latest version: 1.0.8

# 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](https://api.staircase.co/docs/Mortgage%20Products/Borrower/Employment/partnerWidgetToken#root)

### JS

```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

```js
import { Widget } from '@staircase/partner-credentials-widget'

const token = "YOUR_TOKEN"

const App = () => {
    return <Widget token={token} onComplete={() => {console.log("Widget worked")} onError={()=>{}} onClose={()=>{}} }/>
}
```
npm package: @staircase/persistence-widget
Description: Provides React components to use. Uploads a couple of any files to Staircase Persistence Blobs
Latest version: 0.4.0

# 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

[comment]: <> (Note, to get `token` use  [Staircase endpoint]&#40;https://api.staircase.co/docs&#41;)
Note, get `token` endpoint WIP

### JS
```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
```js
import { PersistenceWidget } from '@staircase/persistence-widget'

const token = "YOUR_TOKEN"

const App = () => {
    return <PersistenceWidget token={token} onComplete={() => {console.log("Widget worked")}} onError={()=>{}}/>
}
```