gh-EmergeTools-Pow/Sources/Pow/Extensions/ViewModifier+DefaultAnimation.swift
Joe Fabisevich 5b95fe95b0
Moving Pow to @emergetools (#36)
Co-authored-by: Robert Böhnke <robb@robb.is>
Co-authored-by: Kasper Lahti <kasper@lahti.email>
2023-11-29 12:08:53 -03:00

11 lines
286 B
Swift

import SwiftUI
internal extension ViewModifier where Self: Animatable {
func defaultAnimation(_ animation: Animation) -> some ViewModifier {
transaction { t in
if t.animation == .default {
t.animation = animation
}
}
}
}