Git Product home page Git Product logo

dutchx-verification-react's Introduction

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:
  1. HOC approach:

Type: curried function
DutchXVerificationHOC(ReactComponent<any>)(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:

// 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 = () => (
    <StateProvider>       
        <AppOnlineStatusBar />
        <Home />
    </StateProvider>
)

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

Issues

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

License

MIT

dutchx-verification-react's People

Contributors

w3stside avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.