feat: create user photo component

This commit is contained in:
Vinicius Souza 2024-10-25 12:31:01 -03:00
parent 1e0917ab98
commit 55e7e281df
2 changed files with 26 additions and 1 deletions

View file

@ -1,8 +1,16 @@
import { Heading, HStack, Text, VStack } from "@gluestack-ui/themed";
import { UserPhoto } from "./UserPhoto";
export function HomeHeader() {
return (
<HStack bg="$gray600" pt="$16" pb="$5" px="$8" alignItems="center">
<HStack bg="$gray600" pt="$16" pb="$5" px="$8" alignItems="center" gap="$4">
<UserPhoto
source={{ uri: 'https://i.pravatar.cc/200' }}
alt="avatar image"
h="$16"
w="$16"
/>
<VStack>
<Text color="$gray100" fontSize="$sm">
Olá,

View file

@ -0,0 +1,17 @@
import { ComponentProps } from "react";
import { Image } from "@gluestack-ui/themed";
type Props = ComponentProps<typeof Image>;
export function UserPhoto({ ...others }: Props) {
return (
<Image
rounded="$full"
overflow="hidden"
borderWidth="$2"
borderColor="$gray400"
backgroundColor="$gray500"
{...others}
/>
)
}