[DE PE SSE mobile] Fix Bug 50903

This commit is contained in:
ShimaginAndrey 2021-06-18 18:07:15 +03:00
parent 005bb841dc
commit f1b4663ec4

View file

@ -56,12 +56,15 @@ const CustomColors = ({ options, customColors, onColorClick, curColor }) => {
></a>) ></a>)
} }
} }
let indexCurColor = colors.indexOf(curColor);
return ( return (
<div className='palette'> <div className='palette'>
{colors && colors.length > 0 && colors.map((color, index) => { {colors && colors.length > 0 && colors.map((color, index) => {
return( return(
<a key={`dc-${index}`} <a key={`dc-${index}`}
className={curColor && curColor === color ? 'active' : ''} className={curColor && curColor === color && index === indexCurColor ? 'active' : ''}
style={{background: `#${color}`}} style={{background: `#${color}`}}
onClick={() => {onColorClick(color)}} onClick={() => {onColorClick(color)}}
></a> ></a>