.neumorphic()
struct ContentView: View {
@State private var isPressed: Bool = false
let color = Color.red
var body: some View {
Button{
self.isPressed.toggle()
} label: {
Label("Hello", systemImage: "person")
// ๐ .neumorphic()
.neumorphic(isPressed: $isPressed, color: color)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(color)
.edgesIgnoringSafeArea(.all)
}
}
Last updated
Was this helpful?