mirror of
https://github.com/thedevs-network/kutt-extension.git
synced 2026-02-03 13:53:23 +00:00
36 lines
826 B
TypeScript
36 lines
826 B
TypeScript
import {QRCodeSVG} from 'qrcode.react';
|
|
import {Dispatch, SetStateAction} from 'react';
|
|
|
|
import styles from './Modal.module.scss';
|
|
|
|
type Props = {
|
|
link: string;
|
|
setModalView: Dispatch<SetStateAction<boolean>>;
|
|
};
|
|
|
|
function Modal({link, setModalView}: Props) {
|
|
return (
|
|
<>
|
|
<div className={styles.modalOverlay}>
|
|
<div className={styles.modalContent}>
|
|
<div className={styles.qrCodeWrapper}>
|
|
<QRCodeSVG size={196} value={link} />
|
|
</div>
|
|
|
|
<div className={styles.buttonWrapper}>
|
|
<button
|
|
onClick={(): void => setModalView(false)}
|
|
className={styles.closeButton}
|
|
type="button"
|
|
>
|
|
Close
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default Modal;
|