mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 12:19:06 +00:00
29 lines
711 B
TypeScript
29 lines
711 B
TypeScript
"use client";
|
|
import React, { useState } from "react";
|
|
import FullscreenModal from "./fullsreenModal";
|
|
import PrivacyContent from "./privacyContent";
|
|
|
|
type PrivacyProps = {
|
|
buttonText: string;
|
|
};
|
|
|
|
export default function Privacy({ buttonText }: PrivacyProps) {
|
|
const [modalOpen, setModalOpen] = useState(false);
|
|
|
|
return (
|
|
<>
|
|
<button
|
|
className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px] font-light px-2"
|
|
onClick={() => setModalOpen(true)}
|
|
>
|
|
{buttonText}
|
|
</button>
|
|
{modalOpen && (
|
|
<FullscreenModal close={() => setModalOpen(false)}>
|
|
<PrivacyContent />
|
|
</FullscreenModal>
|
|
)}
|
|
</>
|
|
);
|
|
}
|