d
This commit is contained in:
1 parent
1779eb3efe
commit
a0ad8da8df
8 files changed
+63
-2
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import BusX
|
||||
import SwiftUI
|
||||
|
||||
extension MicItem {
|
||||
public struct V: View {
|
||||
@StateObject var isActive = BusUI.Value(Mic.K.isActive, false)
|
||||
|
||||
public init() {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
||||
Bus.send(Mic.K.isActive, true)
|
||||
}
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
|
||||
Bus.send(Mic.K.isActive, false)
|
||||
}
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
Text("Mic activity")
|
||||
.padding(8)
|
||||
.border(
|
||||
isActive.v ? Color.black : Color.gray,
|
||||
width: isActive.v ? 3 : 1
|
||||
)
|
||||
.animation(.easeInOut(duration: 0.3))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
public enum MicItem { }
|
||||
Reference in new issue
Block a user