Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839import AppKitimport SwiftUI
struct MenuPanelNotice: View { let item: NSMenuItem let content: MenuPanelContent
var body: some View { VStack(alignment: .leading, spacing: 8) { if let submenu = item.submenu { Label(item.title, systemImage: "arrow.down.circle") .font(.subheadline).fontWeight(.medium) Text(MenuText.text("The update is set to install when Parcel quits.")) .font(.caption).foregroundStyle(.secondary) HStack { ForEach(submenu.items, id: \.self) { action in Button(action.title) { content.perform(action) } .disabled(!action.isEnabled) } } } else { Button { content.perform(item) } label: { Label(item.title, systemImage: "exclamationmark.circle") .frame(maxWidth: .infinity, alignment: .leading) } .buttonStyle(.plain) .disabled(!item.isEnabled) if let detail = item.toolTip { Text(detail).font(.caption).foregroundStyle(.secondary) } } } .fixedSize(horizontal: false, vertical: true) .modifier(MenuPanelCard()) }}