12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import React from 'react'
- import { NavigationActions, createAction } from '../../utils'
- import { View, Text, TouchableOpacity, PixelRatio } from 'react-native'
- import Icon from '../../components/Iconfont/Iconfont'
- // 头部
- export const HeaderView = (dispatch, name) => {
- return (
- <View
- style={{
- height: HEADERSTYLE.height,
- paddingTop: HEADERSTYLE.paddingTop + 5,
- backgroundColor: '#fff',
- borderBottomColor: '#eee',
- borderBottomWidth: 1 / PixelRatio.get(),
- }}
- >
- <View
- style={{
- flex: 1,
- justifyContent: 'center',
- }}
- >
- <TouchableOpacity
- style={{ position: 'absolute', left: 10, flexDirection: 'row' }}
- onPress={() => dispatch(NavigationActions.back())}
- >
- <Icon
- name="icon-icon-fanhui"
- size={20}
- color={'#666'}
- style={{ marginTop: 4 }}
- />
- <Text
- style={{
- fontSize: 14,
- lineHeight: 20,
- color: '#666',
- alignSelf: 'center',
- }}
- >
- 返回
- </Text>
- </TouchableOpacity>
- <Text
- style={{
- alignSelf: 'center',
- fontSize: 18,
- lineHeight: 25,
- letterSpacing: 0.19,
- color: '#333',
- }}
- >
- {name}
- </Text>
- </View>
- </View>
- )
- }
|