feat: initialize mobile blackjack app with authentication and game features
This commit is contained in:
54
src/components/TableBackground.js
Normal file
54
src/components/TableBackground.js
Normal file
@@ -0,0 +1,54 @@
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { LinearGradient } from 'expo-linear-gradient';
|
||||
import { colors } from '../theme';
|
||||
|
||||
export default function TableBackground({ children }) {
|
||||
return (
|
||||
<View style={styles.wrapper}>
|
||||
<LinearGradient
|
||||
colors={[colors.tableEdge, '#3e2a10']}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 1 }}
|
||||
style={styles.edge}
|
||||
>
|
||||
<LinearGradient
|
||||
colors={[colors.tableFelt, colors.tableFeltDark]}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 1 }}
|
||||
style={styles.felt}
|
||||
>
|
||||
<View style={styles.innerRing} />
|
||||
{children}
|
||||
</LinearGradient>
|
||||
</LinearGradient>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
wrapper: {
|
||||
flex: 1,
|
||||
padding: 12
|
||||
},
|
||||
edge: {
|
||||
flex: 1,
|
||||
borderRadius: 220,
|
||||
padding: 10
|
||||
},
|
||||
felt: {
|
||||
flex: 1,
|
||||
borderRadius: 200,
|
||||
padding: 20,
|
||||
overflow: 'hidden'
|
||||
},
|
||||
innerRing: {
|
||||
position: 'absolute',
|
||||
top: 16,
|
||||
bottom: 16,
|
||||
left: 16,
|
||||
right: 16,
|
||||
borderWidth: 2,
|
||||
borderColor: 'rgba(255,255,255,0.15)',
|
||||
borderRadius: 180
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user