"use client"; import * as React from "react"; import { cn } from "./lib/utils"; export interface ActionButton { id: string; label: string; glyph?: string; tone?: "default" | "accent" | "danger"; } export interface ActionButtonsProps extends Omit, "onSelect"> { buttons?: ActionButton[]; onAction?: (id: string) => void; } const tones: Record = { default: "bg-card text-foreground", accent: "bg-accent text-accent-foreground border-accent", danger: "bg-destructive text-white border-destructive", }; /** Action buttons: diamond cluster of large touch targets for primary game actions. */ export function ActionButtons({ buttons = [ { id: "a", label: "Attack", glyph: "A", tone: "accent" }, { id: "b", label: "Block", glyph: "B" }, { id: "x", label: "Interact", glyph: "X" }, { id: "y", label: "Jump", glyph: "Y" }, ], onAction, className, ...props }: ActionButtonsProps) { const [pressed, setPressed] = React.useState(null); return (
{buttons.map((b) => ( ))}
); }