Skip to content

Commit d41d381

Browse files
authored
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
1 parent 36699af commit d41d381

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

frontend/src/app/scripts/_components/ScriptItems/Alerts.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import TextCopyBlock from "@/components/TextCopyBlock";
22
import { AlertColors } from "@/config/siteConfig";
33
import { Script } from "@/lib/types";
44
import { cn } from "@/lib/utils";
5-
import { Info } from "lucide-react";
5+
import { AlertCircle, NotepadText } from "lucide-react";
66

77
type NoteProps = {
88
text: string;
@@ -21,7 +21,11 @@ export default function Alerts({ item }: { item: Script }) {
2121
AlertColors[note.type],
2222
)}
2323
>
24-
<Info className="h-4 min-h-4 w-4 min-w-4" />
24+
{note.type == "info" ? (
25+
<NotepadText className="h-4 min-h-4 w-4 min-w-4" />
26+
) : (
27+
<AlertCircle className="h-4 min-h-4 w-4 min-w-4" />
28+
)}
2529
<span>{TextCopyBlock(note.text)}</span>
2630
</p>
2731
</div>

frontend/src/config/siteConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ export const analytics = {
3737

3838
export const AlertColors = {
3939
warning: "border-red-500/25 bg-destructive/25",
40-
info: "border-cyan-500/25 bg-cyan-50 dark:border-cyan-900/25 dark:bg-cyan-900",
40+
info: "border-cyan-500/25 bg-cyan-50 dark:border-cyan-900 dark:bg-cyan-900/25",
4141
};

0 commit comments

Comments
 (0)