feat: Initial commit

This commit is contained in:
2024-12-02 17:04:28 -05:00
commit 22dfc6ce51
18 changed files with 505 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import Rainbow
// public extension Node {
// func labelStyel(_ styles: Style...) -> any Node {}
// }
public extension Node where Self == Label {
func labelStyle(_ styles: Style...) -> some Node {
modifier(LabelStyleModifier(styles: styles))
}
}
struct LabelStyleModifier: NodeModifier {
let styles: [Style]
func render(content: Label) -> some Node {
var label = content
label.styles = styles
return label
}
}