Commit 21d5a486 by tungnq

TODO: Refactor lại Sub_Button và điều chỉnh giao diện list_work

parent c8eaec98
...@@ -18,8 +18,12 @@ import { ...@@ -18,8 +18,12 @@ import {
import R from '../../assets/R'; import R from '../../assets/R';
// Component SubButton (nút con của FAB) // Component SubButton (nút con của FAB)
const SubButton = props => { const SubButton =({
const { label, onPress , images, backgroundColor } = props; label,
onPress,
images,
backgroundColor
})=> {
// Biến sharedValue để quản lý độ mờ (opacity) khi nhấn giữ // Biến sharedValue để quản lý độ mờ (opacity) khi nhấn giữ
const buttonOpacity = useSharedValue(1); const buttonOpacity = useSharedValue(1);
......
import { StyleSheet, Text, View } from 'react-native' import { StyleSheet, Text, View } from 'react-native'
import R from '../../assets/R'
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container:{
flex:1,
backgroundColor:R.colors.white
},
body:{
flex:1,
backgroundColor:R.colors.white
}
}) })
export default styles export default styles
\ No newline at end of file
import React from 'react'; import React from 'react';
import {Text, View, TouchableOpacity, StyleSheet} from 'react-native'; import {Text, View, TouchableOpacity, StyleSheet} from 'react-native';
import styles from './style';
import FAB from '../../components/FAB/fab';
import SubButton from '../../components/FAB/sub_button';
import Header from '../../components/Header/Header';
import Dropdown from '../../components/DropdownAlert/Dropdown';
import R from '../../assets/R';
const ListWorkView = (props) => { const ListWorkView = (props) => {
const { } = props; const { } = props;
return ( return (
<View <View
style={{ style={styles.container}>
flex: 1, <Header title={'Danh sách công việc'} isBack />
justifyContent: 'center', <View style = {styles.body}>
alignItems: 'center',
}}> </View>
<TouchableOpacity> <FAB>
<Text>ListWork</Text> <SubButton
</TouchableOpacity> onPress={() =>({})}
label="Tạo công việc"
images={R.images.icMenuEdit}
backgroundColor={R.colors.blue}
/>
</FAB>
</View> </View>
); );
}; };
export default ListWorkView; export default ListWorkView;
const styles = StyleSheet.create({})
\ No newline at end of file
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