feat: Adds stacks, working on styles

This commit is contained in:
2024-12-04 10:40:39 -05:00
parent 46c2c7ad31
commit 10119c3e51
12 changed files with 232 additions and 107 deletions

View File

@@ -59,3 +59,15 @@ extension Optional: NodeRepresentable where Wrapped: NodeRepresentable {
return node.render()
}
}
extension Array: TextNode where Element: TextNode {
public var body: some TextNode {
NodeContainer(nodes: self)
}
}
extension Array: NodeRepresentable where Element: NodeRepresentable {
public func render() -> String {
map { $0.render() }.joined()
}
}