feat: Initial filter pressure drop views, calculations need implemented.
This commit is contained in:
34
Sources/Styleguide/Row.swift
Normal file
34
Sources/Styleguide/Row.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
import Elementary
|
||||
|
||||
public struct Row<Body: HTML>: HTML {
|
||||
|
||||
let body: Body
|
||||
|
||||
public init(
|
||||
@HTMLBuilder body: () -> Body
|
||||
) {
|
||||
self.body = body()
|
||||
}
|
||||
|
||||
public var content: some HTML<HTMLTag.div> {
|
||||
div(.class("flex justify-between")) {
|
||||
body
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public extension Row
|
||||
where Body == _HTMLTuple2<HTMLElement<HTMLTag.span, HTMLText>, HTMLElement<HTMLTag.span, HTMLText>>
|
||||
{
|
||||
init(
|
||||
label: String,
|
||||
value: String
|
||||
) {
|
||||
self.init {
|
||||
span(.class("font-bold")) { label }
|
||||
span { value }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension Row: Sendable where Body: Sendable {}
|
||||
Reference in New Issue
Block a user