|
|
|
@ -1,18 +1,22 @@
|
|
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
import Image from 'next/image';
|
|
|
|
|
|
|
|
|
|
import { Dialog, DialogContent, DialogTrigger, DialogClose } from '@/components/ui/dialog';
|
|
|
|
|
|
|
|
|
|
import { QRCode, IconClose } from '@/components';
|
|
|
|
|
import { IconClose } from '@/components';
|
|
|
|
|
|
|
|
|
|
export default function QRCodeDialog({
|
|
|
|
|
header,
|
|
|
|
|
buttonText,
|
|
|
|
|
url,
|
|
|
|
|
img,
|
|
|
|
|
subHeader,
|
|
|
|
|
children,
|
|
|
|
|
}: {
|
|
|
|
|
header: string;
|
|
|
|
|
url: string;
|
|
|
|
|
img: string;
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
subHeader?: string;
|
|
|
|
|
buttonText?: string;
|
|
|
|
@ -33,7 +37,7 @@ export default function QRCodeDialog({
|
|
|
|
|
|
|
|
|
|
{/* 二维码 */}
|
|
|
|
|
<div className="w-[200px] h-[200px] mt-[24px] bg-[#fff] rounded-[6px] overflow-hidden">
|
|
|
|
|
{!!url && <QRCode text={url} className="w-full h-full" />}
|
|
|
|
|
{!!img && <Image width={200} height={200} src={img} alt="" />}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* 按钮 */}
|
|
|
|
|