| 1234567891011121314151617181920212223242526272829 |
- //
- // ShowHideTapper.swift
- // Todos
- //
- // Created by Sam Jaffe on 2/28/26.
- //
- import SwiftUI
- struct ShowHideTapper: View {
- @Binding var shown: Bool
- @Binding var hideToggle: Bool
-
- var body: some View {
- Label("", systemImage: hideToggle ? "eye.slash" : "eye")
- .onTapGesture {
- hideToggle = !hideToggle
- }
- .padding(.leading, -6.5)
- .padding(.trailing, -6.5)
- .help("Toggle visibility")
- }
- }
- #Preview {
- @Previewable @State var shown = false
- @Previewable @State var hidden = false
- ShowHideTapper(shown: $shown, hideToggle: $hidden)
- }
|