feat: Adds thermal balance point, still need to implement economic balance point.

This commit is contained in:
2025-03-04 12:46:44 -05:00
parent d22beb9375
commit 6c31a9db09
11 changed files with 362 additions and 40 deletions

View File

@@ -110,17 +110,17 @@ public struct Toggle: HTML {
switch isOn {
case true:
SecondaryButton(label: onLabel)
.attributes(.class("rounded-s-lg"), .disabled)
.attributes(.class("rounded-s-lg"), .disabled, .type(.button))
PrimaryButton(label: offLabel)
.attributes(contentsOf: offAttributes + [.class("rounded-e-lg")])
.attributes(contentsOf: offAttributes + [.class("rounded-e-lg"), .type(.button)])
case false:
PrimaryButton(label: onLabel)
.attributes(contentsOf: onAttributes + [.class("rounded-s-lg")])
.attributes(contentsOf: onAttributes + [.class("rounded-s-lg"), .type(.button)])
SecondaryButton(label: offLabel)
.attributes(.class("rounded-e-lg"), .disabled)
.attributes(.class("rounded-e-lg"), .disabled, .type(.button))
}
}
}

View File

@@ -26,7 +26,7 @@ public struct WarningBox<Header: HTML>: HTML, Sendable {
div(.id("warnings")) {
if warnings.count > 0 {
header(warnings)
ul(.class("list-disc mx-10")) {
ul(.class("list-disc mx-10 mt-4")) {
for warning in warnings {
li { warning }
}
@@ -52,7 +52,7 @@ public extension WarningBox where Header == HTMLElement<HTMLTag.span, HTMLText>
self.init(
warnings: warnings,
header: { warnings in
span(.class("font-semibold mb-4 border-b")) { "Warning\(warnings.count > 1 ? "s:" : ":")" }
span(.class("font-semibold mb-4 border-b border-amber-500")) { "Warning\(warnings.count > 1 ? "s:" : ":")" }
}
)
}