parent
2bf9128eac
commit
8207cd3892
@ -0,0 +1,21 @@
|
|||||||
|
//
|
||||||
|
// TextStyles.swift
|
||||||
|
// DouShouQi_App
|
||||||
|
//
|
||||||
|
// Created by Rémi REGNAULT on 16/05/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
protocol TextStyle: ViewModifier {}
|
||||||
|
|
||||||
|
extension Text {
|
||||||
|
func textStyle(T: any TextStyle) {
|
||||||
|
modifier(T)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum TextStyles {
|
||||||
|
case ViewTitleTextStyle
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
//
|
||||||
|
// ViewTitleTextStyle.swift
|
||||||
|
// DouShouQi_App
|
||||||
|
//
|
||||||
|
// Created by Rémi REGNAULT on 16/05/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ViewTitleTextStyle: TextStyle {
|
||||||
|
func body(content: Content) -> some View {
|
||||||
|
content
|
||||||
|
.foregroundColor(Colors.TitleText)
|
||||||
|
.fontWeight(.bold)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue