From 49cd7e4bcf599c17c3e466cc9f483ec063e926c1 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 19 Mar 2024 22:06:59 +0000 Subject: [PATCH] add pressed state and rm cloneElement --- src/screens/Login/ChooseAccountForm.tsx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/screens/Login/ChooseAccountForm.tsx b/src/screens/Login/ChooseAccountForm.tsx index 4fcca5f5..dd807ba3 100644 --- a/src/screens/Login/ChooseAccountForm.tsx +++ b/src/screens/Login/ChooseAccountForm.tsx @@ -35,13 +35,7 @@ function Group({children}: {children: React.ReactNode}) { {i > 0 ? ( ) : null} - {React.cloneElement(child, { - // @ts-ignore - style: { - borderRadius: 0, - borderWidth: 0, - }, - })} + {child} ) : null })} @@ -77,14 +71,14 @@ function AccountItem({ ? _(msg`Continue as ${account.handle} (currently signed in)`) : _(msg`Sign in as ${account.handle}`) }> - {({hovered}) => ( + {({hovered, pressed}) => ( @@ -165,7 +159,7 @@ export const ChooseAccountForm = ({ style={[a.flex_1]} onPress={() => onSelectAccount(undefined)} label={_(msg`Login to account that is not listed`)}> - {({hovered}) => ( + {({hovered, pressed}) => (