This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": 1, | |
| "description": "Improving Cyber Security" | |
| }, | |
| { | |
| "id": 2, | |
| "icon": "round", | |
| "description": "Keeping fur out of fashion" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import {SafeAreaView, StyleSheet} from 'react-native'; | |
| import SwipeButton from './src/components/SwipeButton'; | |
| const App = () => { | |
| return ( | |
| <SafeAreaView style={styles.container}> | |
| <SwipeButton onToggle={() => {}}/> | |
| </SafeAreaView> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| const { width: SCREEN_WIDTH } = Dimensions.get('window'); | |
| const BUTTON_WIDTH = SCREEN_WIDTH - 48; | |
| const BUTTON_HEIGHT = 100; | |
| const BUTTON_PADDING = 10; | |
| const SWIPEABLE_DIMENSIONS = 100 - 2 * BUTTON_PADDING; | |
| const H_WAVE_RANGE = SWIPEABLE_DIMENSIONS + 2 * BUTTON_PADDING; | |
| const H_SWIPE_RANGE = BUTTON_WIDTH - 2 * BUTTON_PADDING - SWIPEABLE_DIMENSIONS; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //... | |
| const animatedStylesText = useAnimatedStyle(() => ({ | |
| opacity: interpolate( | |
| sharedValue.value, | |
| InterpolateXInput, | |
| [0.7, 0], | |
| Extrapolate.CLAMP, | |
| ), | |
| transform: [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //... | |
| const AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient); | |
| //... | |
| //... | |
| const colorWave = useAnimatedStyle(() => ({ | |
| width: H_WAVE_RANGE + sharedValue.value, | |
| opacity: interpolate(sharedValue.value, InterpolateXInput, [0, 1]), | |
| })); | |
| //... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Metro configuration for React Native | |
| * https://github.com/facebook/react-native | |
| * | |
| * @format | |
| */ | |
| const {getDefaultConfig} = require('metro-config'); | |
| module.exports = (async () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ...// | |
| const [bodySectionHeight, setBodySectionHeight] = useState(0); | |
| const bodyHeight = useAnimatedStyle(() => ({ | |
| height: interpolate(shareValue.value, [0, 1], [0, bodySectionHeight]) | |
| })); | |
| ....// | |
| ...// | |
| <Animated.View |
OlderNewer