diff --git a/BlueComponents.js b/BlueComponents.js index fd0d9071c..ba9e5407b 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -2741,6 +2741,7 @@ const tabsStyles = StyleSheet.create({ borderBottomWidth: 1, }, tabRoot: { + flex: 1, justifyContent: 'center', alignItems: 'center', borderColor: 'white', @@ -2749,7 +2750,7 @@ const tabsStyles = StyleSheet.create({ }); export const BlueTabs = ({ active, onSwitch, tabs }) => ( - + {tabs.map((Tab, i) => ( ( borderColor: BlueCurrentTheme.colors.buttonAlternativeTextColor, borderBottomWidth: 2, }, - { width: width / tabs.length }, ]} > diff --git a/screen/wallets/provideEntropy.js b/screen/wallets/provideEntropy.js index 0655875e4..115d72d4d 100644 --- a/screen/wallets/provideEntropy.js +++ b/screen/wallets/provideEntropy.js @@ -1,7 +1,7 @@ import React, { useReducer, useState } from 'react'; import PropTypes from 'prop-types'; import BN from 'bignumber.js'; -import { Dimensions, View, ScrollView, Text, Image, TouchableOpacity, StyleSheet } from 'react-native'; +import { View, ScrollView, Text, Image, TouchableOpacity, StyleSheet, useWindowDimensions } from 'react-native'; import { Icon } from 'react-native-elements'; import { useNavigation, useRoute, useTheme } from '@react-navigation/native'; @@ -115,6 +115,8 @@ Coin.propTypes = { }; const Dice = ({ push, sides }) => { + const { width } = useWindowDimensions(); + const diceWidth = width / 4; const diceIcon = i => { switch (i) { case 1: @@ -136,7 +138,7 @@ const Dice = ({ push, sides }) => { {[...Array(sides)].map((_, i) => ( push(getEntropy(i, sides))}> - + {sides === 6 ? ( ) : ( @@ -286,6 +288,8 @@ const styles = StyleSheet.create({ borderColor: BlueCurrentTheme.colors.lightButton, margin: 10, padding: 10, + maxWidth: 200, + maxHeight: 200, }, coinImage: { aspectRatio: 1, @@ -301,8 +305,9 @@ const styles = StyleSheet.create({ paddingBottom: 100, }, diceRoot: { - width: Dimensions.get('window').width / 4, aspectRatio: 1, + maxWidth: 200, + maxHeight: 200, }, dice: { margin: 3,