This repository has been archived on 2026-02-12. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
swift-duct-calc/Sources/ViewController/Views/FrictionRate/EquipmentInfoView.swift

46 lines
1.0 KiB
Swift

import Elementary
import ManualDCore
import Styleguide
struct EquipmentInfoView: HTML, Sendable {
let equipmentInfo: EquipmentInfo
var body: some HTML {
div(.class("space-y-4 border border-gray-200 rounded-lg shadow-lg p-4")) {
Row {
h1(.class("text-2xl font-bold")) { "Equipment Info" }
}
Row {
Label { "Static Pressure" }
Number(equipmentInfo.staticPressure)
}
.attributes(.class("border-b border-gray-200"))
Row {
Label { "Heating CFM" }
Number(equipmentInfo.heatingCFM)
}
.attributes(.class("border-b border-gray-200"))
Row {
Label { "Cooling CFM" }
Number(equipmentInfo.coolingCFM)
}
.attributes(.class("border-b border-gray-200"))
Row {
div {}
EditButton()
.attributes(
.hx.get(route: .frictionRate(.form(.equipmentInfo))),
.hx.target("#equipmentForm"),
.hx.swap(.outerHTML)
)
}
}
div(.id("equipmentForm")) {}
}
}