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
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
This commit is contained in:
@ -72,6 +72,8 @@ struct ParsedColor {
|
||||
"""
|
||||
}
|
||||
|
||||
// MARK: - UIKit
|
||||
|
||||
func getColorProperty() -> String {
|
||||
"""
|
||||
/// Color \(name) is \(light) (light) or \(dark) (dark)"
|
||||
@ -89,4 +91,24 @@ struct ParsedColor {
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
// MARK: - SwiftUI
|
||||
|
||||
func getSUIColorProperty() -> String {
|
||||
"""
|
||||
/// Color \(name) is \(light) (light) or \(dark) (dark)"
|
||||
var \(name): Color {
|
||||
Color("\(name)")
|
||||
}
|
||||
"""
|
||||
}
|
||||
|
||||
func getSUIColorStaticProperty() -> String {
|
||||
"""
|
||||
/// Color \(name) is \(light) (light) or \(dark) (dark)"
|
||||
static var \(name): Color {
|
||||
Color("\(name)")!
|
||||
}
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user