File tree 2 files changed +3
-7
lines changed
Sources/ShinySwiftUI/Extensions/SwiftUI
2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ public extension Text {
19
19
- parameter value: The value to animate.
20
20
*/
21
21
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) " )
24
23
}
25
24
}
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 {
41
41
content
42
42
. overlay (
43
43
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)
45
46
)
46
47
. slickAnimation ( value: value. wrappedValue)
47
48
. onAppear { animate = true }
You can’t perform that action at this time.
0 commit comments