How to use the qrcode.react.propTypes function in qrcode

To help you get started, we’ve selected a few qrcode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github go-faast / faast-web / src / app / components / DepositQRCode / index.jsx View on Github external
import React from 'react'
import PropTypes from 'prop-types'
import { compose, setDisplayName, setPropTypes, defaultProps, withProps } from 'recompose'
import QRCode from 'qrcode.react'
import { omit, pick } from 'lodash'
import classNames from 'class-names'

import { numberish } from 'Utilities/propTypes'

import style from './style.scss'

const qrCodePropTypes = omit(QRCode.propTypes, 'value', 'className')

export default compose(
  setDisplayName('DepositQRCode'),
  setPropTypes({
    address: PropTypes.string.isRequired,
    asset: PropTypes.object,
    amount: numberish,
    scan: PropTypes.bool,
    depositTag: PropTypes.string,
    qrClass: PropTypes.string,
    ...qrCodePropTypes,
  }),
  defaultProps({
    scan: false,
  }),
  withProps(({ address, depositTag, asset: { bip21Prefix, cmcID, symbol } = {}, amount, qrClass, ...props }) => {