Skip to content

Commit

Permalink
feat: use arrow over back text
Browse files Browse the repository at this point in the history
  • Loading branch information
MattCMcCoy committed Feb 24, 2024
1 parent f652f40 commit e3bd14e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions client/assets/arrow-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion client/components/profile/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Text, View } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { styled } from 'nativewind';

import ArrowLeft from '../../assets/arrow-left.svg';
import Ellipse from '../../assets/profile/ellipse.svg';
import { AppStackNavigation } from '../../navigation/AppNavigation';
import { GroupRole } from '../../types/group';
Expand All @@ -29,7 +30,7 @@ export function Header({ user, role }: HeaderProps) {
<ProfileTopHeader
user={user}
onTouchEndLeft={navigate.goBack}
leftButtonText="Back"
leftButtonText={<ArrowLeft />}
rightButtonText="Edit"
/>
<Text className="items-center justify-center text-center text-xl text-carewallet-white">
Expand Down
4 changes: 2 additions & 2 deletions client/components/profile/ProfileTopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { User } from '../../types/user';
interface ProfileTopHeaderProps {
user: User;
onTouchEndLeft?: () => void;
leftButtonText?: string;
leftButtonText?: JSX.Element | string;
onTouchEndRight?: () => void;
rightButtonText?: string;
}
Expand All @@ -22,7 +22,7 @@ export function ProfileTopHeader({
<View className="flex w-full flex-row items-center justify-center">
<Pressable className="ml-5 mr-auto" onTouchEnd={onTouchEndLeft}>
<View className="mt-14 h-7 w-14 items-center justify-center self-start rounded-lg bg-carewallet-white">
<Text className="text-md">{leftButtonText}</Text>
{leftButtonText}
</View>
</Pressable>
<Text className="mt-14 self-center text-center text-3xl font-extrabold text-carewallet-white">
Expand Down

0 comments on commit e3bd14e

Please sign in to comment.