Compare commits

..

2 Commits

Author SHA1 Message Date
tommaso 87070dd62f improve divider 2026-07-12 21:39:29 +02:00
tommaso 39457d8faf add support for corner radius in dividers 2026-07-12 21:31:09 +02:00
+8 -2
View File
@@ -12,10 +12,16 @@ struct DividerView: View {
var body: some View {
ZStack {
Rectangle()
.fill(block.style.background?.uiColor ?? .clear)
.foregroundStyle(block.style.background?.uiColor ?? .clear)
Group {
if let corner = block.style.corner {
RoundedRectangle(cornerRadius: corner.radius, style: corner.style)
} else {
Rectangle()
.fill(block.style.foreground?.uiColor ?? .clear)
}
}
.foregroundStyle(block.style.foreground?.uiColor ?? .clear)
.frame(width: width)
.padding(.trailing, block.style.padding?.trailing ?? 0)
.padding(.leading, block.style.padding?.leading ?? 0)