Skip to content

Commit

Permalink
fixes AMA example error on useReanimatedTiming screen (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
JDMathew authored Aug 23, 2024
1 parent d87b469 commit 34065fb
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions examples/shared/src/screens/UseReanimatedTimingScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useReanimatedTiming } from '@react-native-ama/animations';
import { Text } from '@react-native-ama/react-native';
import * as React from 'react';
import { Dimensions, StyleSheet, View } from 'react-native';
import { Dimensions, Linking, StyleSheet, View } from 'react-native';
import Animated, {
useAnimatedStyle,
useSharedValue,
Expand Down Expand Up @@ -42,8 +42,17 @@ export const UseReanimatedTimingScreen = () => {
<Spacer height="big" />
<Text style={styles.intro}>
This example shows how to use the{' '}
<Text onPress={() => {}}>getAnimationDuration</Text> with Reanimated for
a more accessible animations.
<Text
accessibilityRole="link"
style={styles.underline}
onPress={() =>
Linking.openURL(
'https://commerce.nearform.com/open-source/react-native-ama/docs/hooks/useAnimationDuration#getanimationduration',
)
}>
getAnimationDuration
</Text>{' '}
with Reanimated for a more accessible animations.
</Text>
<Spacer height="big" />
<Animated.View style={[styles.box, animatedStyles]} />
Expand All @@ -69,4 +78,7 @@ const styles = StyleSheet.create({
intro: {
lineHeight: theme.lineHeight.medium,
},
underline: {
textDecorationLine: 'underline',
},
});

0 comments on commit 34065fb

Please sign in to comment.