This should be a nice test! Hopefully other users cannot delete my recipes. Though they're setup to soft delete.
16 lines
488 B
TypeScript
16 lines
488 B
TypeScript
import DeleteIconSmall from "../icons/DeleteIconSmall";
|
|
|
|
interface DeleteButtonProps {
|
|
clickHandler: () => void
|
|
}
|
|
|
|
export default function DeleteButton({ clickHandler }: DeleteButtonProps) {
|
|
return (
|
|
<button onClick={clickHandler} className="flex items-center justify-center gap-x-1 rounded-lg border border-gray-300 text-gray-800 px-6 py-3 flex-grow hover:bg-gray-50 hover:border-red-300 duration-300 cursor-pointer">
|
|
<DeleteIconSmall />
|
|
Delete
|
|
</button>
|
|
);
|
|
|
|
}
|