+
+
onChange(colorKey, e.target.value)}
+ className="w-8 h-8 rounded cursor-pointer border-2"
+ style={{ borderColor: theme.colors.border }}
+ title={label}
+ />
+ {isComplexColor && (
+
+ α
+
+ )}
+
+
+
+ {label}
+
+
+ {description}
+
+
+
+ {isEditing ? (
+ onChange(colorKey, e.target.value)}
+ onBlur={() => setIsEditing(false)}
+ onKeyDown={(e) => e.key === 'Enter' && setIsEditing(false)}
+ className="w-32 px-1.5 py-0.5 rounded text-xs font-mono border"
+ style={{
+ backgroundColor: theme.colors.bgActivity,
+ borderColor: theme.colors.border,
+ color: theme.colors.textMain
+ }}
+ autoFocus
+ />
+ ) : (
+
+ )}
+
+
+ );
+}
+
+export function CustomThemeBuilder({
+ theme,
+ customThemeColors,
+ setCustomThemeColors,
+ customThemeBaseId,
+ setCustomThemeBaseId,
+ isSelected,
+ onSelect
+}: CustomThemeBuilderProps) {
+ const [showBaseSelector, setShowBaseSelector] = useState(false);
+ const fileInputRef = useRef