diff --git a/Sources/DashUIKit/Components/AddressFieldView.swift b/Sources/DashUIKit/Components/AddressFieldView.swift index db53e1a..0278960 100644 --- a/Sources/DashUIKit/Components/AddressFieldView.swift +++ b/Sources/DashUIKit/Components/AddressFieldView.swift @@ -121,8 +121,10 @@ public struct AddressFieldView: View { TextField( "", text: $text, + // A prompt must stay a `Text`; `dashFont` returns `some View`, and a + // line height cannot be applied to `Text` anyway. prompt: Text(placeholder) - .dashFont(.subhead) + .font(Font.dash.subhead) .foregroundStyle(Color.dash.black1000Alpha30), axis: .vertical ) diff --git a/Sources/DashUIKit/Components/SearchBar.swift b/Sources/DashUIKit/Components/SearchBar.swift index 3f5471a..7614b08 100644 --- a/Sources/DashUIKit/Components/SearchBar.swift +++ b/Sources/DashUIKit/Components/SearchBar.swift @@ -141,8 +141,10 @@ private struct SearchBarFocused: View { if #available(iOS 17.0, *) { TextField( text: $text, + // A prompt must stay a `Text`; `dashFont` returns `some View`, and a + // line height cannot be applied to `Text` anyway. prompt: Text(placeholder) - .dashFont(.subhead) + .font(Font.dash.subhead) .foregroundStyle(Color.dash.black1000Alpha30) ) { EmptyView()