You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
572 B
24 lines
572 B
import { AntDesign } from "@expo/vector-icons";
|
|
import { Button, ButtonActions } from "./ui/button";
|
|
import { Href, Link } from "expo-router";
|
|
|
|
type props = {
|
|
icon?: any;
|
|
link: Href;
|
|
action?: ButtonActions;
|
|
};
|
|
|
|
export default function BackButton({ icon, link, action }: props) {
|
|
return (
|
|
<Button className="h-16 w-16 mb-4" action={action ?? "secondary"}>
|
|
<Link href={link}>
|
|
<AntDesign
|
|
name={icon ?? "arrowleft"}
|
|
size={30}
|
|
color={action == "primary" ? "white" : "black"}
|
|
/>
|
|
</Link>
|
|
</Button>
|
|
);
|
|
}
|