feat: Completes hvac-system-performance views and api call.

This commit is contained in:
2025-02-28 10:50:33 -05:00
parent 7cd02971a3
commit d08e4b0839
14 changed files with 330 additions and 19 deletions

View File

@@ -1,7 +1,5 @@
import Elementary
// TODO: Experiment with removing text colors and move them further up the call stack.
/// A styled header for a form element, which consists of an
/// svg image and label / name for the form.
///
@@ -20,7 +18,7 @@ public struct FormHeader: HTML, Sendable {
public var content: some HTML {
LabeledContent {
h2(.class("text-2xl font-extrabold text-gray-600 dark:text-slate-200")) { label }
h2(.class("text-2xl font-extrabold")) { label }
} label: {
SVG(svg, color: .blue)
}
@@ -52,8 +50,8 @@ public struct Input: HTML, Sendable {
input(
.id(id), .placeholder(placeholder), .name(name ?? id),
.class("""
w-full px-4 py-2 border border-gray-300 dark:border-gray-400 rounded-md focus:ring-2
focus:ring-yellow-800 focus:border-yellow-800 text-blue-600 dark:text-gray-300
w-full px-4 py-2 border border-gray-300 dark:border-gray-400 rounded-md
focus:ring-2 focus:ring-yellow-800 focus:border-yellow-800
""")
)
}
@@ -76,7 +74,7 @@ public struct InputLabel<InputLabel: HTML>: HTML {
public var content: some HTML<HTMLTag.label> {
label(
.for(forInputId),
.class("block text-sm font-medium text-blue-500 dark:text-gray-300 mb-2")
.class("block text-sm font-medium mb-2")
) {
self.inputLabel
}