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
// 1. Create a generic namespace we can ue to 'hang' values off | |
public struct Namespace<Base> { } | |
// 2. Add a namespace to a type(s) with the desired name | |
extension Color { | |
public static var theme: Namespace<Self> { .init() } | |
} | |
extension Font { | |
public static var theme: Namespace<Self> { .init() } | |
} |