feat: Initial filter pressure drop views, calculations need implemented.
This commit is contained in:
25
Sources/Styleguide/VerticalGroup.swift
Normal file
25
Sources/Styleguide/VerticalGroup.swift
Normal file
@@ -0,0 +1,25 @@
|
||||
import Elementary
|
||||
|
||||
public struct VerticalGroup: HTML, Sendable {
|
||||
let label: String
|
||||
let value: String
|
||||
let valueLabel: String?
|
||||
|
||||
public init(label: String, value: String, valueLabel: String? = nil) {
|
||||
self.label = label
|
||||
self.value = value
|
||||
self.valueLabel = valueLabel
|
||||
}
|
||||
|
||||
public var content: some HTML<HTMLTag.div> {
|
||||
div(.class("grid grid-cols-1 justify-items-center")) {
|
||||
p(.class("font-medium")) { label }
|
||||
h3(.class("text-3xl font-extrabold")) {
|
||||
value
|
||||
if let valueLabel {
|
||||
span(.class("text-lg ms-2")) { valueLabel }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user