Last active
April 7, 2020 19:11
-
-
Save SwiftyAlex/4ced027df47b8663cf113b33af84451e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Container View | |
struct SomeView: View { | |
var body: some View { | |
VStack { | |
Text("Welcome to our SwiftUI app") | |
.modifier(CompanyHeaderLabel()) | |
FeaturedContentView() | |
ArticlesScrollView() | |
FooterView() | |
} | |
} | |
} | |
// ViewModifier | |
struct CompanyHeaderLabel: ViewModifier { | |
func body(content: Content) -> some View { | |
content | |
.font(.custom("Montserrat-Bold", size: 16)) | |
.foregroundColor(.textBlack) | |
.padding() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment