mirror of
https://github.com/EmergeTools/Pow.git
synced 2026-03-25 08:55:50 +00:00
Co-authored-by: Robert Böhnke <robb@robb.is> Co-authored-by: Kasper Lahti <kasper@lahti.email>
29 lines
584 B
Swift
29 lines
584 B
Swift
import Pow
|
|
import SwiftUI
|
|
|
|
struct AnvilExample: View, Example {
|
|
@State
|
|
var isVisible: Bool = false
|
|
|
|
var body: some View {
|
|
ZStack {
|
|
if isVisible {
|
|
PlaceholderView()
|
|
.transition(.movingParts.anvil)
|
|
}
|
|
}
|
|
.defaultBackground()
|
|
.onTapGesture {
|
|
withAnimation {
|
|
isVisible.toggle()
|
|
}
|
|
}
|
|
.autotoggle($isVisible)
|
|
}
|
|
|
|
static let localPath = LocalPath()
|
|
|
|
static var icon: Image? {
|
|
Image(systemName: "scalemass")
|
|
}
|
|
}
|