WIP: Adds support for QR Code generation #27
3 changed files with 16 additions and 0 deletions
0
frontend/src/components/qrCode/qrCodeGenerator.css
Normal file
0
frontend/src/components/qrCode/qrCodeGenerator.css
Normal file
13
frontend/src/components/qrCode/qrCodeGenerator.tsx
Normal file
13
frontend/src/components/qrCode/qrCodeGenerator.tsx
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import React from "react";
|
||||||
|
import { QRCodeSVG } from "qrcode.react";
|
||||||
|
import { qrCodeGeneratorProps } from "./qrCodeGeneratorProps";
|
||||||
|
|
||||||
|
const QRCodeGenerator: React.FC<qrCodeGeneratorProps> = ({ url }) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<QRCodeSVG id="qrCodeSVG" value={url} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default QRCodeGenerator;
|
3
frontend/src/components/qrCode/qrCodeGeneratorProps.ts
Normal file
3
frontend/src/components/qrCode/qrCodeGeneratorProps.ts
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export interface qrCodeGeneratorProps {
|
||||||
|
url: string;
|
||||||
|
}
|
Loading…
Reference in a new issue