// src/components/storage/MenuBtn.jsx
import React from "react";

export default function MenuBtn({ onAction, danger = false, children }) {
  return (
    <button
      type="button"
      className={`w-full flex gap-2 items-center text-right rounded-xl text-sm font-semibold px-3 py-2
        ${danger ? "text-red-600 dark:text-red-300 hover:bg-red-500/10" : "dark:text-white text-black hover:bg-[#A1E3F980] dark:hover:bg-white/10"}
      `}
      onPointerDown={(e) => {
        e.preventDefault();
        e.stopPropagation();
      }}
      onClick={(e) => {
        e.preventDefault();
        e.stopPropagation();
        onAction?.();
      }}
    >
      {children}
    </button>
  );
}
