Fix color node reference and class name indexing (#55461)

Signed-off-by: Yasin B. Kalkan <yasinburakkalkan@gmail.com>
This commit is contained in:
Yasin B. Kalkan
2025-10-25 16:09:18 +03:00
committed by GitHub
parent 1d0b0a440c
commit 00e392e66d

View File

@@ -72,10 +72,10 @@ const Palette: React.FC<PaletteProps> = (props) => {
key={i}
ref={(node) => {
if (node) {
colorNodesRef.current[`${name}-${i}`] = node;
colorNodesRef.current[`${name}-${i + 1}`] = node;
}
}}
className={`main-color-item palette-${name}-${i}`}
className={`main-color-item palette-${name}-${i + 1}`}
style={{
color: (name === 'yellow' ? i > 6 : i > 5) ? firstColor : lastColor,
fontWeight: i === 6 ? 'bold' : 'normal',