diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc1d9be7b..a977da40b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: MNEMONICS_COLDCARD: ${{ secrets.MNEMONICS_COLDCARD }} e2e: - runs-on: macos-latest + runs-on: macos-13 steps: - name: checkout uses: actions/checkout@v4 @@ -90,7 +90,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: '11' + java-version: '17' - name: Build run: npm run e2e:release-build diff --git a/BlueComponents.js b/BlueComponents.js index 1bf58041a..6af3965c0 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -441,41 +441,4 @@ export function BlueBigCheckmark({ style = {} }) { ); -} - -const tabsStyles = StyleSheet.create({ - root: { - flexDirection: 'row', - height: 50, - borderColor: '#e3e3e3', - borderBottomWidth: 1, - }, - tabRoot: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - borderColor: 'white', - borderBottomWidth: 2, - }, -}); - -export const BlueTabs = ({ active, onSwitch, tabs }) => ( - - {tabs.map((Tab, i) => ( - onSwitch(i)} - style={[ - tabsStyles.tabRoot, - active === i && { - borderColor: BlueCurrentTheme.colors.buttonAlternativeTextColor, - borderBottomWidth: 2, - }, - ]} - > - - - ))} - -); +} \ No newline at end of file diff --git a/components/Tabs.tsx b/components/Tabs.tsx new file mode 100644 index 000000000..a9eff2741 --- /dev/null +++ b/components/Tabs.tsx @@ -0,0 +1,55 @@ +import React from 'react'; +import { StyleSheet, View, TouchableOpacity } from 'react-native'; +import { useTheme } from './themes'; + +const tabsStyles = StyleSheet.create({ + root: { + flexDirection: 'row', + height: 50, + borderColor: '#e3e3e3', + borderBottomWidth: 1, + }, + tabRoot: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + borderColor: 'white', + borderBottomWidth: 2, + }, + activeTabRoot: { + borderColor: 'transparent', + borderBottomWidth: 2, + }, + marginBottom: { + marginBottom: 30, + }, +}); + +interface TabProps { + active: boolean; +} + +interface TabsProps { + active: number; + onSwitch: (index: number) => void; + tabs: React.ComponentType[]; + isIpad?: boolean; +} + +export const Tabs: React.FC = ({ active, onSwitch, tabs, isIpad = false }) => { + const { colors } = useTheme(); + return ( + + {tabs.map((Tab, i) => ( + onSwitch(i)} + style={[tabsStyles.tabRoot, active === i && { ...tabsStyles.activeTabRoot, borderColor: colors.buttonAlternativeTextColor }]} + > + + + ))} + + ); +}; diff --git a/screen/wallets/provideEntropy.js b/screen/wallets/provideEntropy.js index 5c6e730c9..81c541813 100644 --- a/screen/wallets/provideEntropy.js +++ b/screen/wallets/provideEntropy.js @@ -8,9 +8,10 @@ import { useNavigation, useRoute } from '@react-navigation/native'; import loc from '../../loc'; import { BlueCurrentTheme, useTheme } from '../../components/themes'; import { FContainer, FButton } from '../../components/FloatButtons'; -import { BlueSpacing20, BlueTabs } from '../../BlueComponents'; +import { BlueSpacing20 } from '../../BlueComponents'; import navigationStyle from '../../components/navigationStyle'; import SafeArea from '../../components/SafeArea'; +import { Tabs } from '../../components/Tabs'; const ENTROPY_LIMIT = 256; @@ -244,7 +245,7 @@ const Entropy = () => { -