feat: Adds WarningBox to Styleguide

This commit is contained in:
2025-02-28 17:18:09 -05:00
parent 49af734a97
commit 3be0f7a828
7 changed files with 74 additions and 53 deletions

View File

@@ -98,9 +98,6 @@ struct HVACSystemPerformanceResult: HTML, Sendable {
PsychrometricPropertiesGrid(title: "Supply Air Properties", properties: response.supplyAirProperties)
}
}
// header: {
// p { "Fix me." }
// }
}
private struct CapacityContainer: HTML, Sendable {
@@ -134,7 +131,6 @@ struct HVACSystemPerformanceResult: HTML, Sendable {
text-lg font-semibold flex justify-center py-2 mb-4 text-blue-600 dark:text-slate-300
""")) { "System Performance Metrics" }
// grid grid-cols-1 md:grid-cols-2 gap-6
div(.class("flex justify-between items-center p-4")) {
div(.class("space-y-3")) {
LabeledMetric(label: "Airflow per Ton", value: metrics.cfmPerTon, units: "CFM/ton")
@@ -155,12 +151,8 @@ struct HVACSystemPerformanceResult: HTML, Sendable {
}
if shr < 0.7 {
div(.class("mx-8 mb-4 mt-8 p-4 rounded-xl shadow-lg border border-amber-500 bg-amber-200 text-amber-500")) {
h4(.class("text-lg font-semibold")) { "Warning:" }
p(.class("text-sm")) {
"Low sensible heat ratio may indicate excessive dehumidification or low airflow."
}
}
WarningBox("Low sensible heat ratio may indicate excessive dehumidification or low airflow.")
.attributes(.class("mb-4 mx-8"))
}
}
}