react-native-reanimated#pow TypeScript Examples
The following examples show how to use
react-native-reanimated#pow.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CollapsedOverlayView.tsx From mobile with Apache License 2.0 | 5 votes |
CollapsedOverlayView = ({status, notificationWarning, bottomSheetBehavior}: Props) => {
const i18n = useI18n();
useEffect(() => {
bottomSheetBehavior.refreshSnapPoints(notificationWarning);
}, [notificationWarning, bottomSheetBehavior]);
return (
<TouchableOpacity activeOpacity={0.6} onPress={bottomSheetBehavior.expand}>
<Animated.View style={{opacity: pow(bottomSheetBehavior.callbackNode, 2)}}>
<View style={styles.content}>
<View style={styles.collapseContentHandleBar}>
<Icon name="sheet-handle-bar" size={36} />
</View>
<Box>
<Box marginBottom="s">
<StatusHeaderView enabled={status === SystemStatus.Active} />
</Box>
{notificationWarning && (
<Box
backgroundColor="infoBlockNeutralBackground"
borderRadius={10}
padding="m"
flex={1}
marginBottom="xs"
marginHorizontal="m"
justifyContent="center"
flexDirection="row"
>
<Text variant="menuItemTitle" color="overlayBodyText" accessibilityRole="header">
{i18n.translate('OverlayClosed.NotificationStatus')}
</Text>
<Text variant="menuItemTitle" color="overlayBodyText" fontWeight="bold" accessibilityRole="header">
{i18n.translate('OverlayClosed.NotificationStatusOff')}
</Text>
</Box>
)}
</Box>
</View>
</Animated.View>
</TouchableOpacity>
);
}