🌱 ViewModifier for Text
struct Title: ViewModifier {
let font = Font.system(.title).weight(.semibold)
func body(content: Content) -> some View {
content
.foregroundColor(.blue)
.font(font)
}
}
extension Text {
func titleStyle() -> some View {
self.modifier(Title())
}
}