Fix AlertColors info style in site config for consistent dark mode appearance (#279)

* Fix AlertColors info style in site config for consistent dark mode appearance

* Enhance alert icon display in Alerts component for improved clarity with new icons

* Remove unused icon import in Alerts component to streamline icon usage and improve code clarity
This commit is contained in:
Bram Suurd 2024-11-16 12:15:17 +01:00 committed by GitHub
parent 36699af7d0
commit d41d3812e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import TextCopyBlock from "@/components/TextCopyBlock";
import { AlertColors } from "@/config/siteConfig";
import { Script } from "@/lib/types";
import { cn } from "@/lib/utils";
import { Info } from "lucide-react";
import { AlertCircle, NotepadText } from "lucide-react";
type NoteProps = {
text: string;
@ -21,7 +21,11 @@ export default function Alerts({ item }: { item: Script }) {
AlertColors[note.type],
)}
>
<Info className="h-4 min-h-4 w-4 min-w-4" />
{note.type == "info" ? (
<NotepadText className="h-4 min-h-4 w-4 min-w-4" />
) : (
<AlertCircle className="h-4 min-h-4 w-4 min-w-4" />
)}
<span>{TextCopyBlock(note.text)}</span>
</p>
</div>

View File

@ -37,5 +37,5 @@ export const analytics = {
export const AlertColors = {
warning: "border-red-500/25 bg-destructive/25",
info: "border-cyan-500/25 bg-cyan-50 dark:border-cyan-900/25 dark:bg-cyan-900",
info: "border-cyan-500/25 bg-cyan-50 dark:border-cyan-900 dark:bg-cyan-900/25",
};