-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPanicButton.swift
47 lines (43 loc) · 976 Bytes
/
PanicButton.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// PanicButton.swift
//
//
// Created by Benedict on 24.02.23.
//
import SwiftUI
import Stripes
struct PanicButton: View {
let x32: X32
var body: some View {
Button(action: {
x32.channels.forEach({$0.setMuted(true)})
}) {
HStack {
Spacer()
Image(systemName: "exclamationmark")
.font(.title2.bold())
.foregroundColor(.black)
Text("Alles Aus")
.font(.title2.bold())
.foregroundColor(.black)
Image(systemName: "exclamationmark")
.font(.title2.bold())
.foregroundColor(.black)
Spacer()
}
}
.frame(height: 50)
.background(Stripes(config: StripesConfig(background: .yellow,
foreground: Color.white.opacity(0.4), degrees: 45,
barWidth: 10, barSpacing: 10)))
.cornerRadius(10)
.shadow(color: .yellow, radius: 4)
// .padding()
}
}
struct PanicButton_Previews: PreviewProvider {
static var previews: some View {
PanicButton(x32: X32())
.previewDevice("iPhone 14 Pro")
}
}