This is a snippet of react-native. I need to change the selected tabs icon color to tabBar underline color. How to do it? I am trying code a tab bar like on the twitter android app.
const TabBar = () => {
return (
<Tabs tabBarUnderlineStyle={styles.tabBarUnderline}>
<Tab
heading={<TabHeading style={styles.tabHeading}>
<Icon name="home" size={30} color="#B0BEC5" />
</TabHeading>}
>
<Tab1 />
</Tab>
<Tab
heading={<TabHeading style={styles.tabHeading} ><Icon name="search" size={30} color="#B0BEC5" /></TabHeading>}
>
<Tab1 />
</Tab>
<Tab
heading={<TabHeading style={styles.tabHeading}><Icon name="notifications" size={30} color="#B0BEC5" /></TabHeading>}
>
<Tab1 />
</Tab>
<Tab
heading={<TabHeading style={styles.tabHeading}><Icon name="email" size={30} color="#B0BEC5" /></TabHeading>}
>
<Tab1 />
</Tab>
</Tabs>
);
};
const styles = StyleSheet.create({
tabHeading: {
backgroundColor: 'white',
},
tabBarUnderline: {
backgroundColor: '#29B6F6',
height: 3
}
});
export default TabBar;