Skip to content

Commit

Permalink
Fix name fields appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Feb 16, 2024
1 parent 30525e0 commit a10664d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Sources/SpeziPersonalInfo/Fields/NameFieldRow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ public struct NameFieldRow<Description: View, Label: View>: View {


public var body: some View {
if #available(macOS 12, *), let label = label as? Text {
#if os(macOS)
let isMacOS = true
#else
let isMacOS = false
#endif
if isMacOS, let label = label as? Text {
NameTextField(name: $name, for: component, prompt: label) {
description
}
Expand Down

0 comments on commit a10664d

Please sign in to comment.