soya/src/components/listTitle.js

72 lines
2.5 KiB
JavaScript

import React from 'react';
import { SafeAreaView, Text, Image, Alert, Linking, TouchableOpacity, StyleSheet, View, TextInput, Platform, ScrollView } from 'react-native';
import { colors } from '../assets/styles/colors-theme';
import AsyncStorage from '@react-native-community/async-storage';
import { width, height } from '../services/screen';
import { inject, observer } from "mobx-react"
import { observable, makeObservable } from 'mobx'
import Icon from 'react-native-vector-icons/dist/AntDesign';
import GoogleIcon from 'react-native-vector-icons/dist/MaterialCommunityIcons'
import FontAwesome from 'react-native-vector-icons/dist/FontAwesome5'
import FastImage from 'react-native-fast-image'
import { getStatusBarHeight } from 'react-native-status-bar-height';
import { color } from 'react-native-reanimated';
import { images } from '../assets/images/imageIndex'
import I18n from '../services/i18n'
Icon.loadFont();
GoogleIcon.loadFont()
const ListTitle = inject("appStore")(observer(class ListTitle extends React.Component {
constructor(props) {
super(props);
this.store = props.appStore;
makeObservable(this, {
});
}
render() {
return (
<View style={{
flex: 1,
marginHorizontal: 20,
height:20,
marginTop: 20,
}}>
<View style={{ flexDirection: "row", flex: 1, }}>
<View style={{ flex: 0.7, justifyContent: 'flex-start', alignItems: 'center', flexDirection: 'row',height:20 }}>
<Image source={images.titleLogo} />
<Text style={{color: colors.fontColor, fontWeight: '800',marginLeft:10 }}>
{this.props.title}
</Text>
</View>
<TouchableOpacity style={{ flex: 0.3, justifyContent: 'center', alignItems: 'flex-end',height:20 }}
onPress={() => this.props.onPress && this.props.onPress()}
>
<Text style={{ color: colors.fontColor,fontSize:11 }}>
{I18n.t('showAll')}
</Text>
</TouchableOpacity>
</View>
</View >
)
}
}))
const styles = StyleSheet.flatten({
home_rectanglecd25b34b: {
opacity: 1,
flex: 1,
paddingVertical: 10,
marginTop: 50,
},
})
export default ListTitle