2018-12-05 10:37:42 -08:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import QR from 'qrcode.react';
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
value: string,
|
|
|
|
size?: number,
|
|
|
|
};
|
|
|
|
|
2018-12-15 07:10:39 -08:00
|
|
|
export const QRCode = ({ value, size }: Props) => (
|
2019-02-04 20:41:45 -08:00
|
|
|
<QR
|
|
|
|
data-testid='QRCode'
|
|
|
|
value={value}
|
|
|
|
size={size}
|
|
|
|
/>
|
2018-12-15 07:10:39 -08:00
|
|
|
);
|
2018-12-05 10:37:42 -08:00
|
|
|
|
|
|
|
QRCode.defaultProps = {
|
|
|
|
size: 128,
|
|
|
|
};
|