123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import {StyleSheet, Text, View} from 'react-native';
- import React, {useState} from 'react';
- import PrimaryOutlineButton from '../components/organisms/Buttons/PrimaryOutlineButton';
- import NewscoutTitleHeader from '../components/organisms/Headers/NewscoutTitleHeader';
- import {List, Switch} from 'react-native-paper';
- import fonts from '../theme/fonts';
- import ThemedTextButton from '../components/organisms/Buttons/ThemedTextButton';
- const SecurityPage = props => {
- const {navigation} = props;
- // States
- const [faceIdStatus, setFaceIdStatus] = useState(false);
- const [rememberMeStatus, setRememberMeStatus] = useState(false);
- const [touchIdStatus, setTouchIdStatus] = useState(false);
- return (
- <View>
- <NewscoutTitleHeader
- title={'Security'}
- backButtonShown={true}
- onBackClick={() => navigation.goBack()}
- />
- <List.Item
- title={'Face ID'}
- titleStyle={styles.listItemText}
- style={styles.listItem}
- key={'1'}
- right={props => (
- <Switch
- value={faceIdStatus}
- onValueChange={() => setFaceIdStatus(!faceIdStatus)}
- />
- )}
- />
- <List.Item
- title={'Remember Me'}
- titleStyle={styles.listItemText}
- style={styles.listItem}
- key={'2'}
- right={props => (
- <Switch
- value={rememberMeStatus}
- onValueChange={() => setRememberMeStatus(!rememberMeStatus)}
- />
- )}
- />
- <List.Item
- title={'Touch ID'}
- titleStyle={styles.listItemText}
- style={styles.listItem}
- key={'3'}
- right={props => <Switch value={touchIdStatus} onValueChange={() => setTouchIdStatus(!touchIdStatus)} />}
- />
- <View
- style={{
- paddingHorizontal: 16,
- }}>
- <ThemedTextButton title="Change Password" theme="primary-outline"/>
- </View>
- </View>
- );
- };
- export default SecurityPage;
- const styles = StyleSheet.create({
- listItemText: {
- fontFamily: fonts.type.medium,
- },
- listItem: {
- height: 64,
- justifyContent: 'center',
- },
- });
|