Spaces:
Running
Running
File size: 924 Bytes
20fb2bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | import React from "react";
import { useNavigate } from "react-router-dom";
const BackButton = () => {
const navigate = useNavigate();
return (
<button
onClick={() => navigate(-1)}
className="w-28 h-10 flex items-center justify-center gap-2 rounded-full bg-purple-500 text-black font-medium text-base transition-all duration-200 shadow-sm hover:bg-purple-700 hover:scale-105 active:scale-95 focus:outline-none focus:ring-2 focus:ring-purple-300"
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fillRule="evenodd"
d="M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z"
clipRule="evenodd"
/>
</svg>
Back
</button>
);
};
export default BackButton;
|