1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-28 09:20:52 +01:00
upscayl/renderer/components/NewsModal.tsx

47 lines
1.3 KiB
TypeScript
Raw Normal View History

2023-11-23 06:58:29 +01:00
import React from "react";
2023-11-23 10:25:55 +01:00
export const NewsModal = ({ show, setShow, news }) => {
console.log("🚀 => file: NewsModal.tsx:4 => news:", news);
2023-11-23 06:58:29 +01:00
return (
<dialog className={`modal ${show && "modal-open"}`}>
<div className="modal-box flex flex-col text-center items-center gap-4">
2023-11-23 10:25:55 +01:00
<button onClick={() => setShow(false)}>Don't show again</button>
2023-11-23 06:58:29 +01:00
<button
className="absolute top-2 right-4 btn btn-circle"
onClick={() => setShow(false)}>
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24">
<rect
x="0"
y="0"
width="24"
height="24"
fill="none"
stroke="none"
/>
<path
fill="none"
stroke="currentColor"
stroke-linecap="round"
stroke-width="1.5"
d="m8.464 15.535l7.072-7.07m-7.072 0l7.072 7.07"
/>
</svg>
</button>
2023-11-23 10:25:55 +01:00
<div className="h-80">
<h2 className="text-2xl font-bold text-center">{news.title}</h2>
</div>
2023-11-23 06:58:29 +01:00
</div>
<form method="dialog" className="modal-backdrop">
<button onClick={() => setShow(false)}>close</button>
</form>
</dialog>
);
};