Skip to content

Commit

Permalink
Fix for appearance in watchOS 10, #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Reed Es committed Oct 12, 2023
1 parent 43d814f commit 3808a52
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Sources/TextFieldPreset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,19 @@ public struct TextFieldPreset<ButtonLabel, GroupKey, PresettedItem, PickerLabel>
// MARK: - Views

public var body: some View {
HStack {
TextField(text: $text,
prompt: Text(prompt),
axis: axis) { EmptyView() }

Button(action: { isPresented = true },
label: buttonLabel)
.buttonStyle(.borderless)
}
TextField(text: $text,
prompt: Text(prompt),
axis: axis) { EmptyView() }
.overlay {
HStack {
Spacer()
buttonLabel()
.contentShape(Rectangle())
.onTapGesture {
isPresented = true
}
}
}
.sheet(isPresented: $isPresented) {
NavigationStack {
PresetsPicker(presets: presets,
Expand Down

0 comments on commit 3808a52

Please sign in to comment.