Génération de composant SwiftUI: Color et Image
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
2022-10-31 16:21:32 +01:00
parent 0797667b25
commit 4f7d7e18b1
13 changed files with 258 additions and 11 deletions

View File

@ -29,4 +29,20 @@ extension FontName {
}
"""
}
var suiMethod: String {
"""
func \(fontNameSanitize)(withSize size: CGFloat) -> Font {
Font.custom(FontName.\(fontNameSanitize).rawValue, size: size)
}
"""
}
var suiStaticProperty: String {
"""
static let \(fontNameSanitize): ((_ size: CGFloat) -> Font) = { size in
Font.custom(FontName.\(fontNameSanitize).rawValue, size: size)
}
"""
}
}