An open API service indexing awesome lists of open source software.

https://github.com/gnosis/dutchx-verification-react

Verification React component for DutchX Protocol
https://github.com/gnosis/dutchx-verification-react

Last synced: 6 months ago
JSON representation

Verification React component for DutchX Protocol

Awesome Lists containing this project

README

          

# DutchX Verification React
Simple package for keeping all DutchX Protocol related verification required across multiple projects in one repo.

## Using
Install
`npm i @gnosis.pm/dutchx-verification`

Using - 2 options
1. Component approach:
```
```
2. HOC approach:


Type: curried function

```
DutchXVerificationHOC(ReactComponent)(LOCALFORAGE_VERIFICATION_SETTINGS_KEYNAME, LOCALFORAGE_COOKIES_SETTINGS_KEYNAME, VerificationModalProps)
```

`ReactComponent`: any react component

`LOCALFORAGE_VERIFICATION_SETTINGS_KEYNAME`: string name wishing to save modal verification settings under in browser local database

`LOCALFORAGE_COOKIES_SETTINGS_KEYNAME`: string name wishing to save modal cookies settings under in browser local database

`VerificationModalProps`: object of additional props to pass into verification modal to overwrite default props (see below)

#### Example code:
```jsx
// inside top level App.jsx for example
import React from 'react'
import { DutchXVerificationHOC } from '@gnosis.pm/dutchx-verification-react'

import AppOnlineStatusBar from './components/display/AppOnlineStatus'
import Home from './components/display/Home'
import StateProvider from './components/StateProvider'

import { LOCALFORAGE_KEYS } from './globals'

const App = () => (




)

export default DutchXVerificationHOC(App)('MyProject_VerificationSettings', 'MyProject_CookieSettings')

```

## Issues
This is a new, WIP package so please report any issues!

## License
MIT