import React from "react"; import { AlertCircle, Info } from "lucide-react"; import type { Stop } from "~/data/StopDataProvider"; import "./StopAlert.css"; interface StopAlertProps { stop: Stop; compact?: boolean; } export const StopAlert: React.FC = ({ stop, compact = false }) => { // Don't render anything if there's no alert content const hasContent = stop.title || stop.message; if (!hasContent) { return null; } const isError = stop.cancelled === true; return (
{isError ? : }
{stop.title &&
{stop.title}
} {stop.message &&
{stop.message}
}
); };