diff --git a/src/routes/Installs.css b/src/routes/Installs.css new file mode 100644 index 0000000..12169cb --- /dev/null +++ b/src/routes/Installs.css @@ -0,0 +1,35 @@ +@import 'tailwindcss'; + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes fadeOut { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +.popup-overlay { + @apply fixed w-screen h-screen z-[9999] flex justify-center items-center animate-[fadeIn_0.2s_ease-out_forwards] left-0 top-0 bg-[rgba(0,0,0,0.5)]; +} + +.popup-overlay.fade-out { + @apply animate-[fadeOut_0.2s_ease-out_forwards]; +} + +.popup-box { + @apply relative w-[85vw] h-[80vh] shadow-[0_0_20px_rgba(0,0,0,0.2)] overflow-auto p-6 rounded-lg bg-[#191919]; +} + +.close-button { + @apply flex justify-center items-center absolute bg-[#363636] hover:bg-[#484848] text-2xl cursor-pointer text-gray-300 hover:text-white h-12 w-12 p-3 rounded-xl border-[none] left-2 top-2 transition-colors; +} diff --git a/src/routes/Installs.tsx b/src/routes/Installs.tsx index 9f17bda..76fa007 100644 --- a/src/routes/Installs.tsx +++ b/src/routes/Installs.tsx @@ -1,12 +1,49 @@ -export default function Installs () { - function downloadVersion() { +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import './Installs.css' +import { useState } from 'react' +import { faX } from '@fortawesome/free-solid-svg-icons' +export default function Installs() { + const [showPopup, setShowPopup] = useState(false) + const [fadeOut, setFadeOut] = useState(false) + + function downloadVersion() { + setShowPopup(true) + setFadeOut(false) + } + + function handleOverlayClick(e: React.MouseEvent) { + if (e.target === e.currentTarget) { + setFadeOut(true) + setTimeout(() => setShowPopup(false), 200) + } } return ( <>

Installs

- + + {showPopup && ( +
+
+ +

Select versions to download

+
+
+ )} ) }