Skip to content

Commit 83f5af7

Browse files
committed
fix: color pickers
1 parent 54125ee commit 83f5af7

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/pages/apps/WallpaperEnginePage.jsx

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
import {Link} from 'react-router-dom';
77
import CustomSlider from '../../components/CustomSlider';
88
import CustomDropdown from '../../components/CustomDropdown';
9+
import CustomColorPicker from '../../components/CustomColorPicker';
910
import Seo from '../../components/Seo';
1011
import {useToast} from '../../hooks/useToast';
1112
import BreadcrumbTitle from '../../components/BreadcrumbTitle';
@@ -1348,16 +1349,21 @@ const WallpaperEnginePage = () => {
13481349
<AnimatePresence>
13491350
{preset === 'custom' && (
13501351
<motion.div initial={{opacity: 0, height: 0}} animate={{opacity: 1, height: 'auto'}}
1351-
exit={{opacity: 0, height: 0}} className="space-y-3 pt-2 overflow-hidden">
1352-
<div className="flex gap-2">
1353-
{customColors.map((color, idx) => (<div key={idx} className="flex-1 flex flex-col gap-1">
1354-
<label className="text-[8px] text-gray-600 uppercase">CH_{idx + 1}</label>
1355-
<input type="color" value={color} onChange={(e) => {
1352+
exit={{opacity: 0, height: 0}} className="space-y-3 pt-2 overflow-visible relative z-30">
1353+
<div className="space-y-3">
1354+
{customColors.map((color, idx) => (
1355+
<CustomColorPicker
1356+
key={idx}
1357+
variant="brutalist"
1358+
label={`CH_${idx + 1}`}
1359+
value={color}
1360+
onChange={(newColor) => {
13561361
const newColors = [...customColors];
1357-
newColors[idx] = e.target.value;
1362+
newColors[idx] = newColor;
13581363
setCustomColors(newColors);
1359-
}} className="w-full h-8 bg-transparent border border-white/10 cursor-pointer p-0 block"/>
1360-
</div>))}
1364+
}}
1365+
/>
1366+
))}
13611367
</div>
13621368
<p className="text-[8px] text-gray-600 uppercase italic leading-tight">CH_3 is utilized as the primary
13631369
foundation layer.</p>

0 commit comments

Comments
 (0)