create settings segment component, create new section on settings page
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import settings from '../../../i18n/en/settings'
|
||||
import EnterNewPassword from './enter-new-password'
|
||||
import SettingsButton from './settings-button'
|
||||
import SettingsButton from '../settings-button'
|
||||
import showBackUpReminder from './show-backup-reminder'
|
||||
|
||||
export default class CreatePassword extends Component {
|
||||
|
||||
@@ -5,7 +5,7 @@ import nodejs from 'nodejs-mobile-react-native'
|
||||
import { requestHash, changeEncryptionAndRestartApp } from '../../../db'
|
||||
import AppText from '../../app-text'
|
||||
import PasswordField from './password-field'
|
||||
import SettingsButton from './settings-button'
|
||||
import SettingsButton from '../settings-button'
|
||||
|
||||
import styles from '../../../styles'
|
||||
import settings from '../../../i18n/en/settings'
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import { TouchableOpacity } from 'react-native'
|
||||
import AppText from '../../app-text'
|
||||
import styles from '../../../styles'
|
||||
|
||||
const SettingsButton = ({ children, ...props }) => {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
style={[
|
||||
styles.settingsButton,
|
||||
props.disabled ? styles.settingsButtonDisabled : null
|
||||
]}
|
||||
{ ...props }
|
||||
>
|
||||
<AppText style={styles.settingsButtonText}>
|
||||
{children}
|
||||
</AppText>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
|
||||
SettingsButton.propTypes = {
|
||||
onPress: PropTypes.func.isRequired,
|
||||
disabled: PropTypes.bool
|
||||
}
|
||||
|
||||
export default SettingsButton
|
||||
@@ -6,7 +6,7 @@ import settings from '../../../i18n/en/settings'
|
||||
import { requestHash } from '../../../db'
|
||||
import EnterNewPassword from './enter-new-password'
|
||||
import PasswordField from './password-field'
|
||||
import SettingsButton from './settings-button'
|
||||
import SettingsButton from '../settings-button'
|
||||
import showBackUpReminder from './show-backup-reminder'
|
||||
import checkCurrentPassword from './check-current-password'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user