| 12345678910111213141516171819202122232425262728293031323334 |
- //
- // CreateHintPopover.swift
- // Todos
- //
- // Created by Sam Jaffe on 3/1/26.
- //
- import SwiftUI
- struct CreateHintPopover: View {
- @Binding var showingPopup: Bool
- @EnvironmentObject var allHints: URLHintArray
- @State var currentHint: URLHint = URLHint()
-
- var body: some View {
- TextField("", text: $currentHint.prefix, prompt: Text("Tag Prefix"))
- TextField("", text: $currentHint.replacement, prompt: Text("URL Form"))
- HStack {
- Button(action: {
- currentHint = URLHint()
- showingPopup = false
- }) {
- Label("Cancel", systemImage: "x.circle")
- }
- Button(action: {
- allHints.array.append(currentHint)
- currentHint = URLHint()
- showingPopup = false
- }) {
- Label("Submit", systemImage: "checkmark.circle")
- }
- }
- }
- }
|