better fps testing ui + more info + comment + users minor update

This commit is contained in:
2025-11-06 03:08:20 +08:00
parent 8550887bfb
commit 4c0c33382f
10 changed files with 682 additions and 197 deletions

View File

@@ -6,12 +6,17 @@ interface ToolButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
className?: string
selected?: boolean
}
export const ToolButton = ({ children, className, selected, ...rest }: ToolButtonProps) => {
export const ToolButton = ({ children, className, selected, disabled, ...rest }: ToolButtonProps) => {
return (
<button
type="button"
disabled={disabled}
className={cn(
"flex shrink-0 gap-0.5 active:scale-95 cursor-pointer items-center min-w-7 justify-center px-2 py-1.5 bg-black/5 transition hover:bg-black/10 dark:bg-white/5 dark:hover:bg-white/10 rounded-md text-sm leading-none",
"flex shrink-0 gap-0.5 items-center min-w-7 justify-center px-2 py-1.5 bg-black/5 transition rounded-md text-sm leading-none",
disabled
? "opacity-50 cursor-not-allowed"
: "active:scale-95 cursor-pointer hover:bg-black/10 dark:hover:bg-white/10",
"dark:bg-white/5",
className,
selected &&
"bg-purple-500/40 hover:bg-purple-500/20 text-purple-900 dark:text-purple-100 drop-shadow-sm dark:bg-purple-500/40 dark:hover:bg-purple-500/20"