Atoll/DynamicIsland/components/Settings/ListItemPopover.swift
2025-07-13 20:26:03 +05:30

28 lines
650 B
Swift

//
// ListItemPopover.swift
// boringNotch
//
// Created by Richard Kunkli on 15/09/2024.
//
import SwiftUI
struct ListItemPopover<Content: View>: View {
let content: () -> Content
@State private var isPresented: Bool = false
var body: some View {
Button {
isPresented.toggle()
} label: {
Image(systemName: "info.circle")
.foregroundStyle(.secondary)
}
.controlSize(.regular)
.popover(isPresented: $isPresented, attachmentAnchor: .rect(.bounds), arrowEdge: .trailing, content: {
content()
.padding()
})
}
}