el.xwx.moe/components/AnnouncementBar.tsx

34 lines
969 B
TypeScript
Raw Normal View History

2023-11-07 12:06:42 -06:00
import Link from "next/link";
import React, { MouseEventHandler } from "react";
type Props = {
toggleAnnouncementBar: MouseEventHandler<HTMLButtonElement>;
};
export default function AnnouncementBar({ toggleAnnouncementBar }: Props) {
return (
2023-11-26 04:17:08 -06:00
<div className="fixed w-full z-20 bg-base-200">
2023-11-07 12:06:42 -06:00
<div className="w-full h-10 rainbow flex items-center justify-center">
<div className="w-fit font-semibold">
🎉 See what's new in{" "}
2023-11-07 13:51:22 -06:00
<Link
href="https://blog.linkwarden.app/releases/v2.4"
2023-11-07 13:51:22 -06:00
target="_blank"
className="underline hover:opacity-50 duration-100"
2023-11-07 13:51:22 -06:00
>
Linkwarden v2.4
</Link>
! 🥳
2023-11-07 12:06:42 -06:00
</div>
<button
2023-12-17 03:08:00 -06:00
className="fixed right-3 hover:opacity-50 duration-100"
onClick={toggleAnnouncementBar}
>
<i className="bi-x text-neutral text-2xl"></i>
2023-11-07 12:06:42 -06:00
</button>
</div>
</div>
);
}