diff --git a/ContactLog/ContactLog.js b/ContactLog/ContactLog.js index 7ccd403..ab36fa8 100644 --- a/ContactLog/ContactLog.js +++ b/ContactLog/ContactLog.js @@ -7,7 +7,6 @@ import { Image, TouchableOpacity, } from 'react-native'; -import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view'; import colors from '../assets/colors'; import Locations from './Locations'; import People from './People'; @@ -17,6 +16,7 @@ import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import PropTypes from 'prop-types'; import Calendar from '../views/Calendar'; +import TabView from '../views/TabView'; class ContactLog extends Component { constructor() { @@ -61,29 +61,10 @@ class ContactLog extends Component { value: new Date(day.dateString.replace(/-/g, '/')), }); }}> - { - return ( - - ); - }}> + - + ); @@ -116,6 +97,17 @@ const styles = StyleSheet.create({ color: colors.section_title, fontWeight: '500', }, + tabBarText: { + fontWeight: '500', + textTransform: 'uppercase', + }, + tabBarUnderline: { + height: 2, + backgroundColor: colors.primary_theme, + }, + tabBar: { + paddingTop: 10, + }, }); ContactLog.propTypes = { diff --git a/views/TabView.js b/views/TabView.js new file mode 100644 index 0000000..1064a83 --- /dev/null +++ b/views/TabView.js @@ -0,0 +1,43 @@ +import React, {Component} from 'react'; +import {StyleSheet} from 'react-native'; +import ScrollableTabView, {DefaultTabBar} from 'react-native-scrollable-tab-view'; +import colors from '../assets/colors'; + +class TabView extends Component { + render() { + return ( + { + return ( + + ); + }}> + {this.props.children} + + ); + } +} + +const styles = StyleSheet.create({ + tabBarText: { + fontWeight: '500', + textTransform: 'uppercase', + }, + tabBarUnderline: { + height: 2, + backgroundColor: colors.primary_theme, + }, + tabBar: { + paddingTop: 10, + }, +}); + +export default TabView;