From 1f02ed5d871a4b6675f3c344a4cae2aea26896b3 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 19 Mar 2024 22:03:49 +0000 Subject: change choose account form to use Button + add hover styles --- src/screens/Login/ChooseAccountForm.tsx | 90 ++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/screens/Login/ChooseAccountForm.tsx b/src/screens/Login/ChooseAccountForm.tsx index 7a3a4555b..4fcca5f52 100644 --- a/src/screens/Login/ChooseAccountForm.tsx +++ b/src/screens/Login/ChooseAccountForm.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {TouchableOpacity, View} from 'react-native' +import {View} from 'react-native' import {Trans, msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import flattenReactChildren from 'react-keyed-flatten-children' @@ -67,31 +67,42 @@ function AccountItem({ }, [account, onSelect]) return ( - - - - - - - - {profile?.displayName || account.handle}{' '} + label={ + isCurrentAccount + ? _(msg`Continue as ${account.handle} (currently signed in)`) + : _(msg`Sign in as ${account.handle}`) + }> + {({hovered}) => ( + + + + + + + {profile?.displayName || account.handle}{' '} + + {account.handle} - {account.handle} - - {isCurrentAccount ? ( - - ) : ( - - )} - - + {isCurrentAccount ? ( + + ) : ( + + )} + + )} + ) } export const ChooseAccountForm = ({ @@ -149,28 +160,35 @@ export const ChooseAccountForm = ({ isCurrentAccount={account.did === currentAccount?.did} /> ))} - onSelectAccount(undefined)} - accessibilityRole="button" - accessibilityLabel={_(msg`Login to account that is not listed`)} - accessibilityHint=""> - - + {({hovered}) => ( + - Other account - - - - + + Other account + + + + )} + -- cgit 1.4.1