Page MenuHomePhabricator

D8769.diff
No OneTemporary

D8769.diff

diff --git a/native/profile/linked-devices-header-right-button.react.js b/native/profile/linked-devices-header-right-button.react.js
new file mode 100644
--- /dev/null
+++ b/native/profile/linked-devices-header-right-button.react.js
@@ -0,0 +1,26 @@
+// @flow
+
+import * as React from 'react';
+import { Text, TouchableOpacity } from 'react-native';
+
+import { useStyles } from '../themes/colors.js';
+
+function LinkedDevicesHeaderRightButton(): React.Node {
+ const styles = useStyles(unboundStyles);
+
+ return (
+ <TouchableOpacity onPress={null}>
+ <Text style={styles.textStyle}>Add</Text>
+ </TouchableOpacity>
+ );
+}
+
+const unboundStyles = {
+ textStyle: {
+ color: 'headerChevron',
+ fontSize: 16,
+ marginRight: 10,
+ },
+};
+
+export default LinkedDevicesHeaderRightButton;
diff --git a/native/profile/profile.react.js b/native/profile/profile.react.js
--- a/native/profile/profile.react.js
+++ b/native/profile/profile.react.js
@@ -16,6 +16,7 @@
import DevTools from './dev-tools.react.js';
import EditPassword from './edit-password.react.js';
import EmojiUserAvatarCreation from './emoji-user-avatar-creation.react.js';
+import LinkedDevicesHeaderRightButton from './linked-devices-header-right-button.react.js';
import LinkedDevices from './linked-devices.react.js';
import PrivacyPreferences from './privacy-preferences.react.js';
import ProfileHeader from './profile-header.react.js';
@@ -51,7 +52,11 @@
};
const editPasswordOptions = { headerTitle: 'Change password' };
const deleteAccountOptions = { headerTitle: 'Delete account' };
-const linkedDevicesOptions = { headerTitle: 'Linked devices' };
+const linkedDevicesOptions = {
+ headerTitle: 'Linked devices',
+ // eslint-disable-next-line react/display-name
+ headerRight: () => <LinkedDevicesHeaderRightButton />,
+};
const buildInfoOptions = { headerTitle: 'Build info' };
const devToolsOptions = { headerTitle: 'Developer tools' };
const appearanceOptions = { headerTitle: 'Appearance' };

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 8:41 AM (18 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2694186
Default Alt Text
D8769.diff (1 KB)

Event Timeline