separate all customize views into their own files
make corner radius a constant create the views in the main app file and pass through so they dont get re-drawn when changing UI things
This commit is contained in:
@@ -27,7 +27,7 @@ struct GraphView: View {
|
||||
BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10)))
|
||||
])
|
||||
}
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.padding()
|
||||
|
||||
ZStack {
|
||||
@@ -40,7 +40,7 @@ struct GraphView: View {
|
||||
BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10)))
|
||||
])
|
||||
}
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.padding()
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ struct GraphView: View {
|
||||
BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10)))
|
||||
])
|
||||
}
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.padding()
|
||||
|
||||
ZStack {
|
||||
@@ -67,7 +67,7 @@ struct GraphView: View {
|
||||
BarChartDataEntry(x: 5, y: Double(Int.random(in: 0...10)))
|
||||
])
|
||||
}
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user