Commit 74d29a3c by tungnq

TODO: Refactor và kiểm tra giao diện màn hình home

parent be6553f0
......@@ -38,6 +38,7 @@ const HeaderHome = props => {
</View>
<TextInput
value={value}
fontSize={R.fontsize.fontSizeContent}
onChangeText={onChangeText}
placeholder={'Tìm kiếm'}
placeholderTextColor={R.colors.white}
......
......@@ -99,7 +99,7 @@ const styles = StyleSheet.create({
marginLeft: 10,
},
text_card_info: {
fontSize: R.sizes.md,
fontSize: R.fontsize.fontSizeContent,
fontWeight: '400',
color: R.colors.black,
fontFamily: R.fonts.InterRegular,
......@@ -127,10 +127,10 @@ const styles = StyleSheet.create({
marginHorizontal: 15,
},
menu_title: {
fontSize: R.fontsize.fontsSizeSubTitle,
fontSize: R.fontsize.fontSizeSubTitle,
fontWeight: '600',
color: R.colors.black,
fontFamily: R.fonts.InterMedium,
fontFamily: R.fonts.fontMedium,
},
scroll: {
flex: 1,
......
......@@ -8,10 +8,7 @@ import {
ScrollView,
TouchableWithoutFeedback,
Keyboard,
SafeAreaView,
Image,
StatusBar,
Platform,
} from 'react-native';
import HeaderCus from '../home/header';
import R from '../../assets/R';
......@@ -20,17 +17,15 @@ import styles from './style';
import {useNavigation} from '@react-navigation/native';
import * as SCREENNAME from '../../routers/ScreenNames';
const HomeView = props => {
const {
const HomeView = ({
menuActivity,
menuStatistics,
menuNotification,
selectedMenuItem,
searchText,
userProfile,
onMenuItemPress,
onSearchChange,
} = props;
}) => {
const navigate = useNavigation();
const renderMenuItem = ({item}) => {
......
......@@ -62,6 +62,8 @@ const ListWorkView = (props) => {
<Header title={'Danh sách công việc'} isBack />
<View style = {styles.body}>
{renderTabView()}
</View>
<FAB>
<SubButton
......
import {useNavigation} from '@react-navigation/native';
import React from 'react';
import {Text, View} from 'react-native';
import LoginView from './view';
import {TABNAVIGATOR} from '../../routers/ScreenNames';
const Login = ({params}) => {
const navigate = useNavigation();
const onLogin = () => {
navigate.navigate(TABNAVIGATOR);
console.log('Hello');
};
return <LoginView onLogin={onLogin} />;
};
export default Login;
import React from 'react';
import {Text, View, StyleSheet, SafeAreaView} from 'react-native';
import TextField from '../../components/Input/TextField';
import {useForm, Controller} from 'react-hook-form';
import R from '../../assets/R';
import Header from '../../components/Header/Header';
import Button from '../../components/Button';
const LoginView = ({onLogin}) => {
const {
control,
handleSubmit,
formState: {errors},
} = useForm();
return (
<SafeAreaView style={styles.container}>
<Header />
<View style={styles.container}>
<Controller
control={control}
rules={{
required: true,
maxLength: 225,
}}
render={({field: {onChange, onBlur, value}}) => (
<TextField
title={'Mã phẩm giống'}
required
value={value}
onChangeText={onChange}
error={errors.code}
/>
)}
name="code"
/>
<Button title={'Lưu'} onPress={handleSubmit(onLogin)} />
</View>
</SafeAreaView>
);
};
export default LoginView;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: R.colors.white,
},
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment