Skip to content

Commit

Permalink
Group content
Browse files Browse the repository at this point in the history
  • Loading branch information
keeshux committed Nov 28, 2024
1 parent b5591b2 commit da23467
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions Library/Sources/UILibrary/Views/About/VersionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ public struct VersionView<Icon>: View where Icon: View {

public var body: some View {
ScrollView {
contentView
}
#if os(iOS)
.background(theme.primaryColor)
.foregroundStyle(.white)
#endif
}
}

extension VersionView where Icon == LogoImage {
public init() {
icon = {
LogoImage()
}
}
}

private extension VersionView {
var contentView: some View {
Group {
icon()
.padding(.top)
Spacer()
Expand All @@ -54,18 +74,6 @@ public struct VersionView<Icon>: View where Icon: View {
.padding()
}
}
#if os(iOS)
.background(theme.primaryColor)
.foregroundStyle(.white)
#endif
}
}

extension VersionView where Icon == LogoImage {
public init() {
icon = {
LogoImage()
}
}
}

Expand Down

0 comments on commit da23467

Please sign in to comment.