Skip to content

Commit bd1e2e0

Browse files
0xBigBossclaude
andauthored
fix(earn): improve terms acceptance checkbox visibility (#1997)
- Add visible border (2px) to checkbox for better prominence - Display error indicator (red circle) when user forgets to check - Fix error text color in dark mode (now shows red correctly) - Remove double-toggle bug by simplifying click handling - Match checkbox size to sign-up form for consistency Resolves user feedback that checkbox was too subtle and easy to miss. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 74de0df commit bd1e2e0

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

packages/app/features/earn/components/EarnTerms.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Anchor, type AnchorProps, Paragraph } from '@my/ui'
22

33
export const EarnTerms = ({ hasError }: { hasError?: boolean }) => {
44
const colorProps = {
5-
color: hasError ? '$lightGrayTextField' : '$lightGrayTextField',
5+
color: hasError ? '$error' : '$lightGrayTextField',
66
'$theme-light': {
77
color: hasError ? '$error' : '$darkGrayTextField',
88
},

packages/app/features/earn/deposit/screen.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
Card,
3+
Circle,
34
Fade,
45
Paragraph,
56
Separator,
@@ -407,6 +408,8 @@ export function DepositForm() {
407408
},
408409
},
409410
areTermsAccepted: {
411+
borderWidth: 2,
412+
borderColor: form.formState.errors.areTermsAccepted ? '$error' : '$borderColor',
410413
backgroundColor: form.getValues().areTermsAccepted ? '$primary' : '$color1',
411414
},
412415
}}
@@ -538,7 +541,13 @@ export function DepositForm() {
538541
{!coinBalances.isLoading && !hasExistingDeposit && <ReferredBy />}
539542
{hasExistingDeposit ? null : (
540543
<XStack gap={'$3'} ai={'center'}>
541-
{areTermsAccepted}
544+
{form.formState.errors.areTermsAccepted ? (
545+
<Shake shakeKey="areTermsAccepted" baseStyle={{ flexShrink: 0 }}>
546+
<Circle size={'$3'} borderWidth={2} borderColor={'$error'} />
547+
</Shake>
548+
) : (
549+
areTermsAccepted
550+
)}
542551
{form.formState.errors.areTermsAccepted ? (
543552
<Shake shakeKey="areTermsAccepted" baseStyle={{ width: '100%', flex: 1 }}>
544553
<EarnTerms hasError={true} />

0 commit comments

Comments
 (0)