From efe85d23e88149bde9e77f9d6cccea2918d309cf Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Thu, 2 Jan 2025 15:49:21 +0100 Subject: [PATCH] feat(#13): Adds initial support for QR Code generation --- frontend/src/components/qrCode/qrCodeGenerator.css | 0 frontend/src/components/qrCode/qrCodeGenerator.tsx | 13 +++++++++++++ .../src/components/qrCode/qrCodeGeneratorProps.ts | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 frontend/src/components/qrCode/qrCodeGenerator.css create mode 100644 frontend/src/components/qrCode/qrCodeGenerator.tsx create mode 100644 frontend/src/components/qrCode/qrCodeGeneratorProps.ts diff --git a/frontend/src/components/qrCode/qrCodeGenerator.css b/frontend/src/components/qrCode/qrCodeGenerator.css new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/components/qrCode/qrCodeGenerator.tsx b/frontend/src/components/qrCode/qrCodeGenerator.tsx new file mode 100644 index 0000000..8c3c8ad --- /dev/null +++ b/frontend/src/components/qrCode/qrCodeGenerator.tsx @@ -0,0 +1,13 @@ +import React from "react"; +import { QRCodeSVG } from "qrcode.react"; +import { qrCodeGeneratorProps } from "./qrCodeGeneratorProps"; + +const QRCodeGenerator: React.FC = ({ url }) => { + return ( +
+ +
+ ); +}; + +export default QRCodeGenerator; diff --git a/frontend/src/components/qrCode/qrCodeGeneratorProps.ts b/frontend/src/components/qrCode/qrCodeGeneratorProps.ts new file mode 100644 index 0000000..ebca946 --- /dev/null +++ b/frontend/src/components/qrCode/qrCodeGeneratorProps.ts @@ -0,0 +1,3 @@ +export interface qrCodeGeneratorProps { + url: string; +}