theme.js 805 Bytes
import React from 'react'
import { StyleSheet } from 'react-native'
import { Colors } from 'react-native/Libraries/NewAppScreen'
import { CardStyleInterpolators } from '@react-navigation/stack'
import { setUnit } from '../libs/utils'
import { Icons } from '../assets/icons'

const Style = StyleSheet.create({
    headerStyle: {
        backgroundColor: Colors.white
    }
})

const headerStyle = {
    headerTitleAlign: 'center',
    headerStyle: Style.headerStyle, // 标题栏样式
    headerTintColor: '#333333', // 标题栏字体颜色
    headerTitleStyle: { fontSize: setUnit(38) },
    headerBackImage: () => (<Icons name="zuo" size={30} color="#333" />), // 标题栏返回图标 
    cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS // 设置左右滑动
}

export { headerStyle }