mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user