SecurityPage.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import {StyleSheet, Text, View} from 'react-native';
  2. import React, {useState} from 'react';
  3. import PrimaryOutlineButton from '../components/organisms/Buttons/PrimaryOutlineButton';
  4. import NewscoutTitleHeader from '../components/organisms/Headers/NewscoutTitleHeader';
  5. import {List, Switch} from 'react-native-paper';
  6. import fonts from '../theme/fonts';
  7. const SecurityPage = props => {
  8. const {navigation} = props;
  9. // States
  10. const [faceIdStatus, setFaceIdStatus] = useState(false);
  11. const [rememberMeStatus, setRememberMeStatus] = useState(false);
  12. const [touchIdStatus, setTouchIdStatus] = useState(false);
  13. return (
  14. <View>
  15. <NewscoutTitleHeader
  16. title={'Security'}
  17. backButtonShown={true}
  18. onBackClick={() => navigation.goBack()}
  19. />
  20. <List.Item
  21. title={'Face ID'}
  22. titleStyle={styles.listItemText}
  23. style={styles.listItem}
  24. key={'1'}
  25. right={props => (
  26. <Switch
  27. value={faceIdStatus}
  28. onValueChange={() => setFaceIdStatus(!faceIdStatus)}
  29. />
  30. )}
  31. />
  32. <List.Item
  33. title={'Remember Me'}
  34. titleStyle={styles.listItemText}
  35. style={styles.listItem}
  36. key={'2'}
  37. right={props => (
  38. <Switch
  39. value={rememberMeStatus}
  40. onValueChange={() => setRememberMeStatus(!rememberMeStatus)}
  41. />
  42. )}
  43. />
  44. <List.Item
  45. title={'Touch ID'}
  46. titleStyle={styles.listItemText}
  47. style={styles.listItem}
  48. key={'3'}
  49. right={props => <Switch value={touchIdStatus} onValueChange={() => setTouchIdStatus(!touchIdStatus)} />}
  50. />
  51. <View
  52. style={{
  53. paddingHorizontal: 16,
  54. }}>
  55. <PrimaryOutlineButton title={'Change Password'} />
  56. </View>
  57. </View>
  58. );
  59. };
  60. export default SecurityPage;
  61. const styles = StyleSheet.create({
  62. listItemText: {
  63. fontFamily: fonts.type.medium,
  64. },
  65. listItem: {
  66. height: 64,
  67. justifyContent: 'center',
  68. },
  69. });