25 lines
504 B
Swift
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 {}
|