feat(players): app Players library and circular NPC tokens on scenes
Add userData players/teams, scene npcTokens with hex-inscribed sizing, session scale synced to presentation, and Playwright e2e coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,6 +17,7 @@ type ButtonProps = {
|
||||
iconOnly?: boolean;
|
||||
/** Позиция тултипа относительно кнопки. */
|
||||
tooltipPlacement?: 'top' | 'bottom' | 'bottom-left';
|
||||
'data-testid'?: string;
|
||||
};
|
||||
|
||||
export function Button({
|
||||
@@ -28,6 +29,7 @@ export function Button({
|
||||
ariaLabel,
|
||||
iconOnly = false,
|
||||
tooltipPlacement = 'top',
|
||||
'data-testid': testId,
|
||||
}: ButtonProps) {
|
||||
const btnRef = useRef<HTMLButtonElement | null>(null);
|
||||
const hostRef = useRef<HTMLSpanElement | null>(null);
|
||||
@@ -85,6 +87,7 @@ export function Button({
|
||||
className={btnClass}
|
||||
disabled={disabled}
|
||||
aria-label={ariaLabel}
|
||||
data-testid={testId}
|
||||
onClick={disabled ? undefined : onClick}
|
||||
onMouseEnter={disabled ? undefined : showTip}
|
||||
onMouseLeave={disabled ? undefined : hideTip}
|
||||
|
||||
Reference in New Issue
Block a user