+ {/* CTAs passed in by the consumer */}
+ {actions.length > 0 && actions.map((action) => {action}
)}
+
+ {/* retry CTA */}
+ {retry && (
+
+ } variant="outlined">
+ {t("ctas.retry")}
+
+
+ )}
+
+ {/* close CTA */}
+ {dismissible && (
+
+ )}
+
+ )
+}
diff --git a/site/src/components/AlertBanner/alertTypes.ts b/site/src/components/AlertBanner/alertTypes.ts
new file mode 100644
index 0000000000000..154c2c9a2cdab
--- /dev/null
+++ b/site/src/components/AlertBanner/alertTypes.ts
@@ -0,0 +1,13 @@
+import { ApiError } from "api/errors"
+import { ReactElement } from "react"
+
+export type Severity = "warning" | "error"
+
+export interface AlertBannerProps {
+ severity: Severity
+ text?: string
+ error?: ApiError | Error | unknown
+ actions?: ReactElement[]
+ dismissible?: boolean
+ retry?: () => void
+}
diff --git a/site/src/components/AlertBanner/severityConstants.tsx b/site/src/components/AlertBanner/severityConstants.tsx
new file mode 100644
index 0000000000000..832b851047487
--- /dev/null
+++ b/site/src/components/AlertBanner/severityConstants.tsx
@@ -0,0 +1,16 @@
+import ReportProblemOutlinedIcon from "@material-ui/icons/ReportProblemOutlined"
+import ErrorOutlineOutlinedIcon from "@material-ui/icons/ErrorOutlineOutlined"
+import { colors } from "theme/colors"
+import { Severity } from "./alertTypes"
+import { ReactElement } from "react"
+
+export const severityConstants: Record