// // ReminderTimeOptionsMenu.swift // suixinkan // // Created by Codex on 2026/6/29. // import SwiftUI /// 提前提醒时间选择控件。 /// 使用 `Menu` 而非 `confirmationDialog`,避免 ScrollView 内 popover 箭头锚点偏移。 struct ReminderTimeOptionsMenu: View { let onSelect: (Int) -> Void @ViewBuilder let label: () -> Label private let options = [0, 5, 10, 15, 30] var body: some View { Menu { ForEach(options, id: \.self) { minute in Button(minute == 0 ? "不提醒" : "\(minute)分钟") { onSelect(minute) } } } label: { label() } } }