Configured and applied SwiftFormat

This commit is contained in:
Stefan Ceriu
2022-09-27 10:17:22 +03:00
committed by Stefan Ceriu
parent ff2e6ddfa7
commit 43c28d23b7
663 changed files with 2329 additions and 2840 deletions
@@ -1,4 +1,4 @@
//
//
// Copyright 2021 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,7 +17,6 @@
import SwiftUI
struct ThemableNavigationBar: View {
// MARK: - Style
// MARK: - Properties
@@ -36,8 +35,7 @@ struct ThemableNavigationBar: View {
@ViewBuilder
var body: some View {
HStack {
Button(action: {backAction()})
{
Button(action: { backAction() }) {
Image(uiImage: Asset.Images.spacesModalBack.image)
.renderingMode(.template)
.foregroundColor(theme.colors.secondaryContent)
@@ -49,8 +47,7 @@ struct ThemableNavigationBar: View {
.foregroundColor(theme.colors.primaryContent)
}
Spacer()
Button(action: {closeAction()})
{
Button(action: { closeAction() }) {
Image(uiImage: Asset.Images.spacesModalClose.image)
.renderingMode(.template)
.foregroundColor(theme.colors.secondaryContent)
@@ -68,16 +65,16 @@ struct NavigationBar_Previews: PreviewProvider {
static var previews: some View {
Group {
VStack {
ThemableNavigationBar(title: nil, showBackButton: true, backAction: {}, closeAction: {})
ThemableNavigationBar(title: "Some Title", showBackButton: true, backAction: {}, closeAction: {})
ThemableNavigationBar(title: nil, showBackButton: false, backAction: {}, closeAction: {})
ThemableNavigationBar(title: "Some Title", showBackButton: false, backAction: {}, closeAction: {})
ThemableNavigationBar(title: nil, showBackButton: true, backAction: { }, closeAction: { })
ThemableNavigationBar(title: "Some Title", showBackButton: true, backAction: { }, closeAction: { })
ThemableNavigationBar(title: nil, showBackButton: false, backAction: { }, closeAction: { })
ThemableNavigationBar(title: "Some Title", showBackButton: false, backAction: { }, closeAction: { })
}
VStack {
ThemableNavigationBar(title: nil, showBackButton: true, backAction: {}, closeAction: {}).theme(.dark)
ThemableNavigationBar(title: "Some Title", showBackButton: true, backAction: {}, closeAction: {}).theme(.dark)
ThemableNavigationBar(title: nil, showBackButton: false, backAction: {}, closeAction: {}).theme(.dark)
ThemableNavigationBar(title: "Some Title", showBackButton: false, backAction: {}, closeAction: {}).theme(.dark)
ThemableNavigationBar(title: nil, showBackButton: true, backAction: { }, closeAction: { }).theme(.dark)
ThemableNavigationBar(title: "Some Title", showBackButton: true, backAction: { }, closeAction: { }).theme(.dark)
ThemableNavigationBar(title: nil, showBackButton: false, backAction: { }, closeAction: { }).theme(.dark)
ThemableNavigationBar(title: "Some Title", showBackButton: false, backAction: { }, closeAction: { }).theme(.dark)
}.preferredColorScheme(.dark)
}
.padding()