Created
June 7, 2020 02:08
-
-
Save prafullakumar/4a908254cba0ac4be1816efa2a0420de 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
import Foundation | |
import SwiftUI | |
struct PrimaryHeader: ViewModifier { | |
func body(content: Content) -> some View { | |
content | |
.font(Font.system(size: Matrix.headerPrimarySize, | |
weight: .bold, | |
design: .default)) | |
.foregroundColor(Color.textHeaderPrimary) | |
} | |
} | |
extension View { | |
func primaryHeader() -> some View { | |
return self.modifier(PrimaryHeader()) | |
} | |
} | |
struct SecondaryHeader: ViewModifier { | |
func body(content: Content) -> some View { | |
content | |
.font(Font.system(size: Matrix.headerSecondarySize, | |
weight: .semibold, | |
design: .default)) | |
.foregroundColor(Color.textHeaderPrimary) | |
} | |
} | |
extension View { | |
func secondaryHeader() -> some View { | |
return self.modifier(SecondaryHeader()) | |
} | |
} | |
struct Paragraph: ViewModifier { | |
func body(content: Content) -> some View { | |
content | |
.font(Font.system(size: Matrix.paragraphSize, | |
weight: .regular, | |
design: .default)) | |
.foregroundColor(Color.textHeaderPrimary) | |
} | |
} | |
extension View { | |
func paragraph() -> some View { | |
return self.modifier(Paragraph()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment