diff --git a/packages/core/src/Tabs/TabsItem.tsx b/packages/core/src/Tabs/TabsItem.tsx index c86ec8753..d680f311c 100644 --- a/packages/core/src/Tabs/TabsItem.tsx +++ b/packages/core/src/Tabs/TabsItem.tsx @@ -42,7 +42,7 @@ export interface TabsItemProps { } function TabsItem(props: TabsItemProps) { - const { activeColor, icon, index, value, onChange, defaultColor, children } = props; + const { activeColor, icon, index, value, onChange, defaultColor } = props; const opacity = useRef(new Animated.Value(0)).current; useEffect(() => { diff --git a/packages/core/src/Tabs/index.tsx b/packages/core/src/Tabs/index.tsx index b8372470a..6befbb4e8 100644 --- a/packages/core/src/Tabs/index.tsx +++ b/packages/core/src/Tabs/index.tsx @@ -1,6 +1,7 @@ import React, { useRef, useEffect, useState } from 'react'; -import { StyleSheet, SafeAreaView, StatusBar, ScrollView, ViewProps, View, ViewStyle, Dimensions } from 'react-native'; - +import { StyleSheet, SafeAreaView, ScrollView, ViewProps, View, ViewStyle, Dimensions } from 'react-native'; +import { useTheme } from '@shopify/restyle'; +import { Theme } from '../theme'; import Item from './TabsItem'; export interface TabsProps extends ViewProps { @@ -15,7 +16,15 @@ export interface TabsProps extends ViewProps { } function Tabs(props: TabsProps) { - const { style, children, onChange, activeColor, value, defaultColor = '#035bb6' } = props; + const theme = useTheme(); + const { + style, + children, + onChange, + activeColor, + value, + defaultColor = theme.colors.primary_background || '#3578e5', + } = props; const scrollViewRef = useRef(null); const [scrollViewWidth, setScrollViewWidth] = useState(Dimensions.get('window').width);