Created
September 16, 2022 10:38
-
-
Save vikingosegundo/9d0b32a46c6144342cbb9238bee10f74 to your computer and use it in GitHub Desktop.
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
struct Lights: View { | |
init(_ rootHandler: @escaping (Message) -> ()) { | |
self.rootHandler = rootHandler | |
} | |
var body: some View { | |
VStack { | |
VStack { | |
NavigationView { | |
List { | |
ForEach(Array(viewState.lights.enumerated()), id:\.offset) { LightCell(light: $1, rootHandler:rootHandler) } | |
} | |
.navigationTitle("Lights") | |
} | |
} | |
} | |
} | |
@EnvironmentObject | |
private var viewState : ViewState | |
private let rootHandler: (Message) -> () | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment