- {showColorPicker && (
- <>
- {/* Invisible backdrop to catch clicks outside */}
-
setShowColorPicker(false)}
- />
-
- {COLOR_OPTIONS.map(({ color, label }, index) => {
- const totalItems = COLOR_OPTIONS.length;
- const arcSpread = 180;
- const startAngle = -90 - arcSpread / 2;
- const angleStep = arcSpread / (totalItems - 1);
- const angle = startAngle + index * angleStep;
- const radius = 55;
- const rad = (angle * Math.PI) / 180;
- const x = Math.cos(rad) * radius;
- const y = Math.sin(rad) * radius;
- const finalX = x - 12;
- const finalY = y - 12;
-
- return (
-
- );
- })}
-
- >
- )}
-