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
- Host: GitHub
- URL: https://github.com/gnosis/dutchx-verification-react
- Owner: gnosis
- License: mit
- Created: 2019-04-03T11:30:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T18:31:30.000Z (over 6 years ago)
- Last Synced: 2025-03-17T23:24:25.776Z (7 months ago)
- Language: JavaScript
- Size: 1.38 MB
- Stars: 1
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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