From de7bddc3a2e61f3ddf7a8d237db515337e43bab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Fri, 6 Sep 2024 11:19:13 +0200 Subject: [PATCH] fix: use cross-platform selectionColor instead of android-only cursorColor --- components/DualCurrencyInput.tsx | 3 ++- components/ui/input.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/DualCurrencyInput.tsx b/components/DualCurrencyInput.tsx index d954e32..b18958d 100644 --- a/components/DualCurrencyInput.tsx +++ b/components/DualCurrencyInput.tsx @@ -52,11 +52,12 @@ export function DualCurrencyInput({ placeholder="0" keyboardType="number-pad" value={inputMode === "sats" ? amount : fiatAmount} - cursorColor={CURSOR_COLOR} + selectionColor={CURSOR_COLOR} onChangeText={onChangeText} aria-labelledbyledBy="amount" style={styles.amountInput} autoFocus={autoFocus} + returnKeyType="done" // aria-errormessage="inputError" /> diff --git a/components/ui/input.tsx b/components/ui/input.tsx index 2cb0f2d..0ed66bc 100644 --- a/components/ui/input.tsx +++ b/components/ui/input.tsx @@ -16,7 +16,7 @@ const Input = React.forwardRef< props.editable === false && 'opacity-50 web:cursor-not-allowed', className )} - cursorColor={CURSOR_COLOR} + selectionColor={CURSOR_COLOR} placeholderClassName={cn('text-muted-foreground', placeholderClassName)} {...props} />