--- import psaMessage from "./psa.json"; let defaultStyle = "flex flex-row md:px-40 sm:px-30 sm:py-0.5 p-3 space-x-2"; let styleImportant; let important; switch (psaMessage.important) { case 0: styleImportant = "hidden" defaultStyle += ' ' + styleImportant break; case 1: important = "Latest News:" styleImportant = "bg-zinc-700" defaultStyle += ' ' + styleImportant break; case 2: important = "WARNING!" styleImportant = "bg-yellow-700" defaultStyle += ' ' + styleImportant break; case 3: important = "EMERGENCY!" styleImportant = "bg-red-800" defaultStyle += ' ' + styleImportant break; } ---
{important}
{psaMessage.announcement}
{psaMessage.link && ( Learn more ↗ )}