Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions frontend/src/app/scripts/_components/ScriptItems/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/config/siteConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};