From 66eaa1ccab96ce90b10e9fd0caf027f696ae5687 Mon Sep 17 00:00:00 2001 From: vaibhavs2 Date: Tue, 13 Apr 2021 03:10:44 +0530 Subject: [PATCH] realmIcon: Add icon to AccountItems in AccountPickerScreen --- src/account/AccountItem.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/account/AccountItem.js b/src/account/AccountItem.js index bdcabb58d66..114670fb527 100644 --- a/src/account/AccountItem.js +++ b/src/account/AccountItem.js @@ -1,6 +1,6 @@ /* @flow strict-local */ import React from 'react'; -import { View } from 'react-native'; +import { View, Image } from 'react-native'; import { BRAND_COLOR, createStyleSheet } from '../styles'; import { RawLabel, Touchable, Label } from '../common'; @@ -31,13 +31,19 @@ const styles = createStyleSheet({ }, icon: { padding: 12, - margin: 12, + margin: 10, }, signedOutText: { fontStyle: 'italic', color: 'gray', marginVertical: 2, }, + realmIcon: { + height: 52, + width: 52, + borderRadius: 4, + marginLeft: 10, + }, }); type Props = $ReadOnly<{| @@ -48,7 +54,7 @@ type Props = $ReadOnly<{| |}>; export default function AccountItem(props: Props) { - const { email, realm, isLoggedIn } = props.account; + const { email, realm, isLoggedIn, realmIcon } = props.account; const showDoneIcon = props.index === 0 && isLoggedIn; const backgroundItemColor = isLoggedIn ? 'hsla(177, 70%, 47%, 0.1)' : 'hsla(0,0%,50%,0.1)'; @@ -63,6 +69,11 @@ export default function AccountItem(props: Props) { { backgroundColor: backgroundItemColor }, ]} > +