File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Sources/ShinySwiftUI/Extensions/SwiftUI Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ public extension Text {
1919 - parameter value: The value to animate.
2020 */
2121 func transition( _ t: AnyTransition , value: String ) -> some View {
22- TextTransitionIDGenerator . count += 1
23- return self . transition ( t) . id ( " _t \( TextTransitionIDGenerator . count) \( value) " )
22+ return self . transition ( t) . id ( " _t \( value) " )
2423 }
2524}
26-
27- fileprivate struct TextTransitionIDGenerator {
28- static var count : Int = 0
29- }
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ fileprivate struct HighlightView<Content>: View where Content: View {
4141 content
4242 . overlay (
4343 RoundedRectangle ( cornerRadius: . xs)
44- . stroke ( . yellow. if ( value == index) , lineWidth: 2.0 )
44+ . stroke ( value. wrappedValue == index ? . yellow : . clear, lineWidth: 2.0 )
45+ . animation ( . none, value: value. wrappedValue)
4546 )
4647 . slickAnimation ( value: value. wrappedValue)
4748 . onAppear { animate = true }
You canβt perform that action at this time.
0 commit comments