This file contains 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, { PureComponent } from 'react' | |
import { | |
View, | |
StyleSheet, | |
Animated, | |
Easing, | |
TouchableOpacity, | |
Dimensions, | |
TextInput, | |
KeyboardAvoidingView, |
This file contains 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, { PureComponent } from 'react' | |
import { View, StyleSheet, Animated, Easing } from 'react-native' | |
class App extends PureComponent { | |
animationValue = new Animated.Value(0) | |
componentDidMount() { | |
Animated.timing(this.animationValue, { | |
toValue: 1, |
This file contains 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
class App extends PureComponent { | |
getOutputValueForIndex = (index, expectedIndex, { prevValue, targetValue, nextValue, defaultValue }) => { | |
const delta = index - expectedIndex | |
switch (delta) { | |
case -1: | |
return prevValue | |
case 0: | |
return targetValue | |
case 1: |
This file contains 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, { PureComponent } from 'react' | |
import { | |
View, | |
Text, | |
StatusBar, | |
StyleSheet, | |
TouchableOpacity, | |
} from 'react-native' | |
import Item from './Item' |
This file contains 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 defaultOptions = { | |
transitionOptions: animatedValue => ({ | |
opacity: animatedValue.interpolate({ | |
inputRange: [0, 1, 2], | |
outputRange: [0, 1, .9], | |
}), | |
transform: [ | |
{ | |
translateX: animatedValue.interpolate({ | |
inputRange: [0, 1, 2], |
This file contains 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 defaultOptions = { | |
transitionOptions: animatedValue => ({ | |
opacity: animatedValue.interpolate({ | |
inputRange: [0, 1, 2], | |
outputRange: [0, 1, .9], | |
}), | |
transform: [ | |
{ | |
perspective: 2000 | |
}, |
This file contains 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 defaultOptions = { | |
transitionOptions: animatedValue => ({ | |
opacity: animatedValue.interpolate({ | |
inputRange: [0, 1, 2], | |
outputRange: [0, 1, .9], | |
}), | |
transform: [ | |
{ | |
perspective: 2000 | |
}, |
This file contains 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 config = { CardModal } | |
const defaultOptions = { | |
transitionOptions: animatedValue => ({ | |
opacity: animatedValue.interpolate({ | |
inputRange: [0, 1, 2], | |
outputRange: [0, 1, .9], | |
}), | |
transform: [ | |
{ | |
perspective: 2000 |
This file contains 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, { PureComponent } from 'react' | |
import { View, StyleSheet, TouchableOpacity, Animated, Dimensions, Easing, ActivityIndicator } from 'react-native' | |
import { Text, Emoji } from '@components' | |
const { width: ww, height: wh } = Dimensions.get('screen') | |
class ConfirmationActionSheet extends PureComponent { | |
state = { | |
active: false |
This file contains 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 rgba = (value, opacity) => { | |
const isHex = hex => { | |
return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex) | |
} | |
const hexToRGB = hex => { | |
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i | |
const longHex = hex.replace(shorthandRegex, function(m, r, g, b) { | |
return r + r + g + g + b + b |