how to toggle button disable on and off react code example
Example 1: disable button in swiftui
import SwiftUI
struct ContentView: View {
@State private var buttonDisabled = true
var body: some View {
Button(action: {
}) {
Text("CLICK ME!")
}
.disabled(buttonDisabled)
}
}
#if DEBUG
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
#endif
Example 2: make a button who disable scrolling down the page react
.container::-webkit-scrollbar { display: none; }.container { -ms-overflow-style: none; }