diff --git a/macos/Sources/Features/About/AboutView.swift b/macos/Sources/Features/About/AboutView.swift index 0b0dcc75f..efe1f31bb 100644 --- a/macos/Sources/Features/About/AboutView.swift +++ b/macos/Sources/Features/About/AboutView.swift @@ -116,6 +116,15 @@ struct AboutView: View { self.url = url } + @ViewBuilder private var textView: some View { + Text(text) + .frame(width: 125, alignment: .leading) + .padding(.leading, 2) + .tint(.secondary) + .opacity(0.8) + .monospaced() + } + var body: some View { HStack(spacing: 4) { Text(label) @@ -123,10 +132,10 @@ struct AboutView: View { .padding(.trailing, 2) if let url { Link(destination: url) { - PropertyText(text: text) + textView } } else { - PropertyText(text: text) + textView } } .font(.callout) @@ -134,19 +143,6 @@ struct AboutView: View { .frame(maxWidth: .infinity) } } - - private struct PropertyText: View { - let text: String - - var body: some View { - Text(text) - .frame(width: 125, alignment: .leading) - .padding(.leading, 2) - .tint(.secondary) - .opacity(0.8) - .monospaced() - } - } } struct AboutView_Previews: PreviewProvider {