voxpreference / frontend /src /components /BackButton.jsx
system's picture
system HF Staff
Update VoxPreference
20fb2bc verified
Raw History Blame Contribute Delete
924 Bytes
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;