Commit 5c465c38 by tungnq

TODO : Test giao diện đơn giản của xem lịch rảnh sinh viên

parent c3bb2ba9
import React from 'react';
import React, { useState } from 'react';
import {Text, View, StyleSheet} from 'react-native';
import CompensateRegisterView from './view';
const CompensateRegister = (props) => {
const [isShow, setShowSchedule] = useState(false);
return (
<CompensateRegisterView />
<CompensateRegisterView
isShow={isShow}
setShowSchedule={setShowSchedule}
/>
);
};
......
......@@ -8,7 +8,22 @@ import Dropdown from '../../../components/DropdownAlert/Dropdown';
import TextMulti from '../../../components/Input/TextMulti';
import Button from '../../../components/Button';
const CompensateRegisterView = props => {
const {} = props;
const {
isShow,
setShowSchedule,
} = props;
const handleToggleSchedule = () => {
setShowSchedule(prevState => !prevState);
};
const renderSchedule = (item) =>{
if (!isShow) return null;
return(
<View>
<Text> hi</Text>
</View>
)
}
return (
<View style={styles.container}>
<Header title={'Đăng kí báo bù'} isBack />
......@@ -94,9 +109,9 @@ const CompensateRegisterView = props => {
/>
<View style={styles.btnRegister}>
<Button
title={'Xem lịch rảnh SV'}
title={isShow ? 'Đóng' : 'Xem lịch rảnh SV'}
textColor={R.colors.white}
onPress={() => {}}
onPress={handleToggleSchedule}
backgroundColor={R.colors.blue}
fontSize={R.sizes.sm}
fontFamily={R.fonts.fontMedium}
......@@ -105,6 +120,8 @@ const CompensateRegisterView = props => {
/>
</View>
{renderSchedule()}
</View>
</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