Xcode – How to hide code duplication(Text and parameters)? SwiftUI
I have a simple code that I used three times Text with identical parameters but with different Text. How to avoid code duplication? I used SwiftUI and Xcode 13.4 Text(status) .fontWeight(.bold) .foregroundColor(Color.white) .padding(.leading, 5) .padding(.trailing, 5) .background(stats) .cornerRadius(3)