feat: Adds thermal balance point, still need to implement economic balance point.
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:" : ":")" }
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user