Commit 6a213b97 by tungnq

TODO: Đã hoàn thiện giao diện modal add work

parent d72ec17d
......@@ -21,8 +21,10 @@ const TextField = props => {
containerMarginTop,
containerBackgroundColor,
onFocus,
fontFamily,
fontFamily = R.fonts.fontMedium,
fontWeight = '600',
height,
color = R.colors.black,
numberOfLines = 5,
} = props;
......@@ -36,9 +38,9 @@ const TextField = props => {
<Text
style={{
fontSize: titleFontSize,
color: 'black',
color: color,
fontFamily:fontFamily,
fontWeight:'400',
fontWeight:fontWeight,
marginBottom: 5,
}}>
{title ? title : ''}
......
import AddWorkModal from './view';
export default AddWorkModal;
import React from 'react';
import React, { useState } from 'react';
import {Text, View, TouchableOpacity, StyleSheet, Image, TextInput} from 'react-native';
import styles from './style';
import FAB from '../../components/FAB/fab';
......@@ -7,6 +7,7 @@ import Header from '../../components/Header/Header';
import Dropdown from '../../components/DropdownAlert/Dropdown';
import R from '../../assets/R';
import TabViewComponent from '../../components/TabView';
import AddWorkModal from '../list_work/modal_add/index';
const ListWorkView = (props) => {
const {
......@@ -14,10 +15,24 @@ const ListWorkView = (props) => {
setSearchQuery,
} = props;
const [modalVisible, setModalVisible] = useState(false);
const handleFilterChange = (item) => {
console.log(item);
};
const handleAddWork = () => {
setModalVisible(true);
};
const handleSaveWork = (workData) => {
console.log('Saving work:', workData);
};
const handleCloseModal = () => {
setModalVisible(false);
};
const renderTabView = () => {
return ( <TabViewComponent
data={[
......@@ -36,7 +51,6 @@ const ListWorkView = (props) => {
alignItems : 'center',
}}
style={{
// marginHorizontal: 5,
marginVertical: 5,
}}
mode="filter"
......@@ -103,12 +117,18 @@ const ListWorkView = (props) => {
</View>
<FAB>
<SubButton
onPress={() =>({})}
onPress={handleAddWork}
label="Tạo công việc"
images={R.images.icMenuEdit}
backgroundColor={R.colors.blue}
/>
</FAB>
<AddWorkModal
visible={modalVisible}
onClose={handleCloseModal}
onSave={handleSaveWork}
/>
</View>
);
};
......
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