Skip to content

Instantly share code, notes, and snippets.

@lutes1
Created August 21, 2022 12:58
Show Gist options
  • Save lutes1/7d677bc78a2cdd5cd1684d2c9106f7e9 to your computer and use it in GitHub Desktop.
Save lutes1/7d677bc78a2cdd5cd1684d2c9106f7e9 to your computer and use it in GitHub Desktop.
extension HeaderView where RightControls == EmptyView {
init(viewModel: HeaderViewModel, @ViewBuilder leftControls: @escaping () -> LeftControls) {
self.init(viewModel: viewModel, leftControls: leftControls, rightControls: { EmptyView() })
}
}
extension HeaderView where LeftControls == EmptyView, RightControls == EmptyView {
init(viewModel: HeaderViewModel) {
self.init(viewModel: viewModel, leftControls: { EmptyView() }, rightControls: { EmptyView() })
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment