diff --git a/src/components/Input.tsx b/src/components/Input.tsx index ce4c394..53dda3c 100644 --- a/src/components/Input.tsx +++ b/src/components/Input.tsx @@ -1,27 +1,30 @@ -import { Input as GSInput, InputField } from "@gluestack-ui/themed"; -import { ComponentProps } from "react"; +import { Input as GSInput, InputField } from '@gluestack-ui/themed'; +import { ComponentProps } from 'react'; -type Props = ComponentProps; +type Props = ComponentProps & { + isReadOnly?: boolean; +}; -export function Input({ ...others }: Props) { +export function Input({ isReadOnly = false, ...others }: Props) { return ( + isReadOnly={isReadOnly} + opacity={isReadOnly ? 0.5 : 1}> - ) + ); } diff --git a/src/screens/Profile.tsx b/src/screens/Profile.tsx index 2879072..4aa497a 100644 --- a/src/screens/Profile.tsx +++ b/src/screens/Profile.tsx @@ -3,6 +3,7 @@ import { Center, Text, VStack } from '@gluestack-ui/themed'; import { ScreenHeader } from '@components/ScreenHeader'; import { UserPhoto } from '@components/UserPhoto'; +import { Input } from '@components/Input'; export function Profile() { return ( @@ -22,6 +23,11 @@ export function Profile() { Alterar foto + +
+ + +