summaryrefslogtreecommitdiff
path: root/Jel/Extensions/BindingNot.swift
blob: 92951b5d1e7448ca7d65f9d6c8d41878270121db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//
//  BindingNot.swift
//  Jel
//
//  Created by zerocool on 2/20/24.
//

import Foundation
import SwiftUI

extension Binding where Value == Bool {
  var not: Binding<Value> {
    Binding<Value>(
      get: { !self.wrappedValue },
      set: { self.wrappedValue = !$0 }
    )
  }
}