diff --git a/src/components/Button.tsx b/src/components/Button.tsx new file mode 100644 index 0000000..1a0953e --- /dev/null +++ b/src/components/Button.tsx @@ -0,0 +1,34 @@ +import { ButtonSpinner, Button as GSButton, Text } from "@gluestack-ui/themed"; +import { ComponentProps } from "react"; + +type Props = ComponentProps & { + title: string, + isLoading?: boolean, +} + +export function Button({ title, isLoading = false, ...others }: Props) { + return ( + + { isLoading ? ( + + ) : ( + + {title} + + )} + + ) +} diff --git a/src/screens/SignIn.tsx b/src/screens/SignIn.tsx index d4c7bf7..3f8dbbb 100644 --- a/src/screens/SignIn.tsx +++ b/src/screens/SignIn.tsx @@ -3,6 +3,7 @@ import { Center, Heading, Image, Text, VStack } from "@gluestack-ui/themed"; import BackgroundImg from '@assets/background.png'; import Logo from '@assets/logo.svg'; import { Input } from "@components/Input"; +import { Button } from "@components/Button"; export function SignIn() { return ( @@ -41,6 +42,10 @@ export function SignIn() { autoCapitalize="none" secureTextEntry /> + +