feat: Adds styleguide, working on result view container.
This commit is contained in:
20
Sources/Styleguide/ResultContainer.swift
Normal file
20
Sources/Styleguide/ResultContainer.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
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 bg-blue-50 dark:bg-slate-400 rounded-lg")) {
|
||||
h3(.class("text-xl font-semibold \(text: .darkGray) mb-4")) { "Results" }
|
||||
body
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ResultContainer: Sendable where Body: Sendable {}
|
||||
Reference in New Issue
Block a user