Handy/src/components/ui/ResetButton.tsx
CJ Pais d6684ccb21
UI v2 (#103)
* wip ui

* pretty much fully new settings page

* proper dark/light mode

* slight style tweak for sidebar

* add about
2025-09-05 12:56:55 -07:00

24 lines
747 B
TypeScript

import React from "react";
import ResetIcon from "../icons/ResetIcon";
interface ResetButtonProps {
onClick: () => void;
disabled?: boolean;
className?: string;
}
export const ResetButton: React.FC<ResetButtonProps> = React.memo(
({ onClick, disabled = false, className = "" }) => (
<button
className={`p-1 rounded fill-text border border-transparent transition-all duration-150 ${
disabled
? "opacity-50 cursor-not-allowed text-text/40"
: "hover:bg-logo-primary/30 active:bg-logo-primary/50 active:translate-y-[1px] hover:cursor-pointer hover:border-logo-primary text-text/80"
} ${className}`}
onClick={onClick}
disabled={disabled}
>
<ResetIcon />
</button>
),
);