Skip to content

Commit

Permalink
fix(mobile): enhance social login button UI and interaction
Browse files Browse the repository at this point in the history
- Increase gap between social login buttons
- Add `hitSlop` to improve touch target area
- Increase social login icon size for better visibility

Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Feb 27, 2025
1 parent a80edbd commit fa32cf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/src/modules/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TermsText = () => {
<ContextMenu.Root>
<ContextMenu.Trigger className="w-full overflow-hidden rounded-full">
<Text className="text-secondary-label text-sm">
<Link href="/terms" className="text-primary-label">
<Link href="/terms" suppressHighlighting className="text-primary-label">
Terms of Service
</Link>
</Text>
Expand Down
7 changes: 4 additions & 3 deletions apps/mobile/src/modules/login/social.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ export function SocialLogin() {
const { colorScheme } = useColorScheme()

return (
<View className="flex flex-row justify-center gap-4">
<View className="flex flex-row justify-center gap-8">
{Object.keys(provider)
.filter((key) => key !== "apple" || (Platform.OS === "ios" && key === "apple"))
.map((key) => {
const providerInfo = provider[key]!
return (
<TouchableOpacity
key={key}
hitSlop={20}
className="border-opaque-separator border-hairline rounded-full p-2"
onPress={async () => {
if (!data?.[providerInfo.id]) return
Expand Down Expand Up @@ -87,8 +88,8 @@ export function SocialLogin() {
disabled={!data?.[providerInfo.id]}
>
<providerInfo.icon
width={20}
height={20}
width={24}
height={24}
color={colorScheme === "dark" ? providerInfo.darkColor : providerInfo.color}
/>
</TouchableOpacity>
Expand Down

0 comments on commit fa32cf4

Please sign in to comment.