Loris Perret 3f64e9682c
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
PixeeBox/resgen.swift/pipeline/head There was a failure building this commit
Add stencil on color
2023-12-15 09:49:11 +01:00

22 lines
727 B
Plaintext

// Generated by ResgenSwift.{{ toolName }} {{ resgenVersion }}
{% if isSwiftUI %}
import SwiftUI
{% else %}
import UIKit
{% endif %}
extension {{ extensionClassname }} {
{% for color in colors %}
{% if isSwiftUI %}
/// Color {{ color.name }} is {{ color.light }} {{ color.light }} or {{ color.dark }} {{ color.dark }}"
{% if isStatic %}static {% endif %}var {{ color.name }}: Color {
Color("{{ color.name }}")
}
{% else %}
/// Color {{ color.name }} is {{ color.light }} {{ color.light }} or {{ color.dark }} {{ color.dark }}"
{% if isStatic %}static {% else %}@objc {% endif %}var {{ color.name }}: UIColor {
UIColor(named: "{{ color.name }}")!
}
{% endif %}
{% endfor %}
}