Skip to content

Commit

Permalink
fix: id card pin height
Browse files Browse the repository at this point in the history
  • Loading branch information
janrtvld committed Jan 13, 2025
1 parent dfcab4d commit 78e2462
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions apps/easypid/src/features/onboarding/screens/id-card-pin.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IdCard, Paragraph, PinPad, PinValues, ScrollView, Stack, XStack, YStack } from '@package/ui'
import { IdCard, Paragraph, PinPad, PinValues, ScrollView, Stack, XStack, YStack, useMedia } from '@package/ui'
import React, { forwardRef, useImperativeHandle, useRef, useState } from 'react'
import type { TextInput } from 'react-native'

Expand All @@ -16,6 +16,7 @@ const pinLength = 6
export const OnboardingIdCardPinEnter = forwardRef(({ goToNextStep }: OnboardingIdCardPinEnterProps, ref) => {
const [pin, setPin] = useState('')
const inputRef = useRef<TextInput>(null)
const media = useMedia()
const { withHaptics } = useHaptics()

// Make the pin pad fixed to the bottom of the screen on smaller devices
Expand Down Expand Up @@ -67,7 +68,7 @@ export const OnboardingIdCardPinEnter = forwardRef(({ goToNextStep }: Onboarding
return (
<YStack fg={1} jc="space-between" mb={shouldStickToBottom ? -16 : undefined}>
{/* Overflow issue only present on smaller devices, so set to max height */}
<ScrollView flex={1} maxHeight={shouldStickToBottom ? 150 : undefined}>
<ScrollView flex={1} maxHeight={media.short ? 150 : undefined}>
<Stack jc="center">
<IdCard
backgroundImage={pidBackgroundImage}
Expand Down
2 changes: 1 addition & 1 deletion apps/easypid/src/features/wallet/FunkeWalletScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function FunkeWalletScreen() {
</YStack>

<FlexPage safeArea="y" fg={1} flex-1={false} bg="transparent">
<XStack>
<XStack pt="$2">
<IconContainer bg="white" aria-label="Menu" icon={<HeroIcons.Menu />} onPress={pushToMenu} />
</XStack>

Expand Down

0 comments on commit 78e2462

Please sign in to comment.