32 lines
599 B
TypeScript
32 lines
599 B
TypeScript
import { Button } from "react-native-paper";
|
|
import { ReactNode } from "react";
|
|
|
|
interface AuthButtonProps {
|
|
onPress: () => void;
|
|
loading?: boolean;
|
|
disabled?: boolean;
|
|
textColor?: string;
|
|
children: ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
export const AuthButton = ({
|
|
onPress,
|
|
loading = false,
|
|
disabled = false,
|
|
children,
|
|
}: AuthButtonProps) => {
|
|
return (
|
|
<Button
|
|
mode="contained"
|
|
onPress={onPress}
|
|
className="py-2 rounded-lg"
|
|
buttonColor="#6750a4"
|
|
disabled={disabled || loading}
|
|
loading={loading}
|
|
>
|
|
{children}
|
|
</Button>
|
|
);
|
|
};
|