2020-05-22 14:38:19 +02:00
|
|
|
import React, { ReactElement } from 'react'
|
2021-03-23 21:38:06 +01:00
|
|
|
// import { QRCode } from 'react-qr-svg'
|
|
|
|
import { title as styleTitle, code } from './Qr.module.css'
|
2019-11-18 21:59:20 +01:00
|
|
|
import Copy from './Copy'
|
2019-10-02 13:35:50 +02:00
|
|
|
|
|
|
|
export default function Qr({
|
|
|
|
address,
|
|
|
|
title
|
|
|
|
}: {
|
|
|
|
address: string
|
|
|
|
title?: string
|
2020-05-22 14:38:19 +02:00
|
|
|
}): ReactElement {
|
2019-10-02 13:35:50 +02:00
|
|
|
return (
|
|
|
|
<>
|
2021-03-23 21:38:06 +01:00
|
|
|
{title && <h4 className={styleTitle}>{title}</h4>}
|
|
|
|
{/* <QRCode
|
2019-10-02 13:35:50 +02:00
|
|
|
bgColor="transparent"
|
|
|
|
fgColor="#6b7f88"
|
|
|
|
level="Q"
|
|
|
|
style={{ width: 120 }}
|
|
|
|
value={address}
|
2021-03-14 01:34:04 +01:00
|
|
|
className={qr}
|
2021-03-23 21:38:06 +01:00
|
|
|
/> */}
|
2019-10-02 13:35:50 +02:00
|
|
|
|
2021-03-14 01:34:04 +01:00
|
|
|
<pre className={code}>
|
2019-10-02 13:35:50 +02:00
|
|
|
<code>{address}</code>
|
2019-11-18 21:59:20 +01:00
|
|
|
<Copy text={address} />
|
2019-10-02 13:35:50 +02:00
|
|
|
</pre>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|