- Implement WebView2-based HMI frontend with React + TypeScript + Vite - Add C# .NET backend with WebSocket communication layer - Separate UI components into modular structure: * RecipePanel: Recipe selection and management * IOPanel: I/O monitoring and control (32 inputs/outputs) * MotionPanel: Servo control for X/Y/Z axes * CameraPanel: Vision system feed with HUD overlay * SettingsModal: System configuration management - Create reusable UI components (CyberPanel, TechButton, PanelHeader) - Implement dual-mode communication (WebView2 native + WebSocket fallback) - Add 3D visualization with Three.js/React Three Fiber - Fix JSON parsing bug in configuration save handler - Include comprehensive .gitignore for .NET and Node.js projects 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import React from 'react';
|
|
|
|
interface TechButtonProps {
|
|
children?: React.ReactNode;
|
|
onClick?: () => void;
|
|
active?: boolean;
|
|
variant?: 'blue' | 'red' | 'amber' | 'green';
|
|
className?: string;
|
|
}
|
|
|
|
export const TechButton: React.FC<TechButtonProps> = ({
|
|
children,
|
|
onClick,
|
|
active = false,
|
|
variant = 'blue',
|
|
className = ''
|
|
}) => {
|
|
const colors = {
|
|
blue: 'from-blue-600 to-cyan-600 hover:shadow-glow-blue border-cyan-400/30',
|
|
red: 'from-red-600 to-pink-600 hover:shadow-glow-red border-red-400/30',
|
|
amber: 'from-amber-500 to-orange-600 hover:shadow-orange-500/50 border-orange-400/30',
|
|
green: 'from-emerald-500 to-green-600 hover:shadow-green-500/50 border-green-400/30'
|
|
};
|
|
|
|
return (
|
|
<button
|
|
onClick={onClick}
|
|
className={`
|
|
relative px-4 py-2 font-tech font-bold tracking-wider uppercase transition-all duration-300
|
|
clip-tech border-b-2 border-r-2
|
|
${active ? `bg-gradient-to-r ${colors[variant]} text-white` : 'bg-slate-800/50 text-slate-400 hover:text-white hover:bg-slate-700/50 border-slate-600'}
|
|
${className}
|
|
`}
|
|
>
|
|
{active && <div className="absolute inset-0 bg-white/20 animate-pulse pointer-events-none"></div>}
|
|
{children}
|
|
</button>
|
|
);
|
|
};
|