Skip to content

tezid/proofs-component

Repository files navigation

@tezid/proofs-component

TezID Proofs React Component

NPM JavaScript Style Guide

Install

npm install --save @tezid/proofs-component

Usage

import { TezIDProof } from '@tezid/proofs-component'
import '@tezid/proofs-component/dist/index.css'

const App = () => {
  const proofs = [
    { id: 'email', label: 'Email' }, 
    { id: 'phone', label: 'Phone' }
  ]
  const proofItems = proofs.map(p => 
    <TezIDProof 
      key={p.id} 
      proof={p} 
      selected={p.id === 'email'}
      onClick={p => console.log(p)} 
    />
  )
  return (
    <div style={{ display: 'flex' }}>
      {proofItems}
    </div>
  )
}

screenshot

License

MIT © tezid