Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const styles = StyleSheet.create({
container: {
position: 'absolute',
left: 0,
right: 0,
borderBottomColor: 'rgba(0, 0, 0, 0.1)',
borderBottomWidth: 1,
backgroundColor: 'rgba(20, 20, 20, 0.5)',
},
topBar: {
top: 0,
},
bottomBar: {
bottom: 0,
paddingBottom: getBottomSpace(),
},
});
export {
BarContainer,
BAR_POSITIONS,
};
render() {
const { style, position, children, height } = this.props;
const isBottomBar = position === BAR_POSITIONS.BOTTOM;
return (
{children}
);
}
}
import React from "react";
import { Dimensions, SafeAreaView, StyleSheet } from "react-native";
import Animated from "react-native-reanimated";
import { PanGestureHandler, State } from "react-native-gesture-handler";
import { onGestureEvent } from "react-native-redash";
import { getBottomSpace } from "react-native-iphone-x-helper";
import { timing, withSpring } from "./AnimatedHelpers";
import TabIcon from "./TabIcon";
import Player from "./Player";
import MiniPlayer from "./MiniPlayer";
const { height } = Dimensions.get("window");
const TABBAR_HEIGHT = getBottomSpace() + 50;
const MINIMIZED_PLAYER_HEIGHT = 42;
const SNAP_TOP = 0;
const SNAP_BOTTOM = height - TABBAR_HEIGHT - MINIMIZED_PLAYER_HEIGHT;
const config = {
damping: 15,
mass: 1,
stiffness: 150,
overshootClamping: false,
restSpeedThreshold: 0.1,
restDisplacementThreshold: 0.1
};
const {
Clock,
Value,
cond,
useCode,
}
showAlert(title, text) {
this.props.alertWithType('error', title, text);
}
_toggleTippingModal() {
this.setState({isTippingModalVisible: !this.state.isTippingModalVisible});
}
}
const styles = StyleSheet.create({
smallPlayerContainer: {
flexDirection: 'row',
position: 'absolute',
bottom: 49 + getBottomSpace(),
left: 0,
right: 0,
...Platform.select({
ios: {
shadowColor: 'black',
shadowOffset: {height: -3},
shadowOpacity: 0.1,
shadowRadius: 3,
},
android: {
elevation: 20,
},
}),
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#34393F',
keyboardShow(e) {
LayoutAnimation.easeInEaseOut();
this.setState({
bottom: isIphoneX() ? (e.endCoordinates.height - getBottomSpace()) : e.endCoordinates.height
});
}
right: 0,
...Platform.select({
ios: {
shadowColor: 'black',
shadowOffset: {height: -3},
shadowOpacity: 0.1,
shadowRadius: 3,
},
android: {
elevation: 20,
},
}),
backgroundColor: Colors.backgroundColor,
paddingVertical: 10,
paddingTop: getStatusBarHeight(true),
paddingBottom: getBottomSpace(),
},
centerText: {
justifyContent: 'center',
alignItems: 'center',
},
optionsButton: {
justifyContent: 'center',
},
modalButton: {
margin: 16,
flexDirection: 'row',
alignItems: 'center',
},
});
function mapStateToProps(state) {