update WarnAlert

This commit is contained in:
lb
2024-04-19 17:03:43 +08:00
parent 9f7652d9f3
commit 9894aeca50
4 changed files with 34 additions and 7 deletions

View File

@@ -3,16 +3,14 @@ import "./warn-alert.css";
import AlertIcon from "./warn-icon.png";
function WarnAlert(props) {
const { x, y, title, content } = props;
return (
<div className="warn-alert">
<div className="warn-alert" style={{ top: `${y}px`, left: `${x}px` }}>
<h1 className="">
<img src={AlertIcon} width={24} alt="icon" />
{props.title || "test"}
{title || "test"}
</h1>
<p>
{props.content ||
"Lorem ipsum dolor sit amet consectetur."}
</p>
<p>{content || "Lorem ipsum dolor sit amet consectetur."}</p>
</div>
);
}