mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 23:24:32 +00:00
28 lines
652 B
Swift
28 lines
652 B
Swift
//
|
|
// ListItemPopover.swift
|
|
// DynamicIsland
|
|
//
|
|
// 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()
|
|
})
|
|
}
|
|
}
|
|
|