WIP: Moves some common views to a Styleguide module, working on room table and form.
This commit is contained in:
18
Sources/Styleguide/Row.swift
Normal file
18
Sources/Styleguide/Row.swift
Normal file
@@ -0,0 +1,18 @@
|
||||
import Elementary
|
||||
|
||||
public struct Row<T: HTML>: HTML, Sendable where T: Sendable {
|
||||
|
||||
let inner: T
|
||||
|
||||
public init(
|
||||
@HTMLBuilder _ body: () -> T
|
||||
) {
|
||||
self.inner = body()
|
||||
}
|
||||
|
||||
public var body: some HTML<HTMLTag.div> {
|
||||
div(.class("flex justify-between")) {
|
||||
inner
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user