Files
swift-hvac-toolbox/Sources/Styleguide/ResultContainer.swift
2025-02-26 22:13:38 -05:00

25 lines
504 B
Swift

import Elementary
public struct ResultContainer<Body: HTML>: HTML {
let body: Body
public init(
@HTMLBuilder body: () -> Body
) {
self.body = body()
}
public var content: some HTML {
div(.class("""
mt-6 p-6 rounded-lg border border-blue-500
bg-blue-50 dark:bg-slate-600
text-blue-500 dark:text-slate-200
""")) {
h3(.class("text-xl font-semibold mb-4")) { "Results" }
body
}
}
}
extension ResultContainer: Sendable where Body: Sendable {}