All files / components/shared/three/ui KoreanButton.tsx

100% Statements 3/3
100% Branches 2/2
100% Functions 1/1
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47                                                                              7x     19x     7x  
/**
 * KoreanButton - Three.js-compatible button component with Korean theming
 * 
 * Provides bilingual button with cyberpunk Korean aesthetic
 * Supports both HTML overlay and 3D mesh rendering
 * 
 * Now refactored to use BaseButton for consistent styling
 * 
 * @module components/three
 */
 
import React from "react";
import { BaseButton, type BaseButtonProps } from "../../base";
 
/**
 * Props for KoreanButton component
 * Extends BaseButtonProps for consistency
 */
export interface KoreanButtonProps extends Omit<BaseButtonProps, "isMobile"> {
  // All props inherited from BaseButton
}
 
/**
 * KoreanButton Component
 * 
 * A bilingual button component with Korean cyberpunk theming.
 * Now uses BaseButton internally for consistent styling and reduced duplication.
 * 
 * @example
 * ```tsx
 * <KoreanButton
 *   korean="공격"
 *   english="Attack"
 *   onClick={() => console.log("Attack clicked")}
 *   variant="primary"
 *   size="md"
 * />
 * ```
 */
export const KoreanButton: React.FC<KoreanButtonProps> = ({ testId, ...rest }) => {
  // Simply delegate to BaseButton - all logic is now centralized
  // Default testId to "korean-button" for backward compatibility
  return <BaseButton testId={testId ?? "korean-button"} {...rest} />;
};
 
KoreanButton.displayName = "KoreanButton";