Add numbers below circles
Add small-sized black font numbers below the circles in the Subtraction Game.
This commit is contained in:
parent
ddb1c17cb5
commit
28e09a1e28
1 changed files with 12 additions and 8 deletions
|
|
@ -212,14 +212,18 @@ const SubtractionGame: React.FC<SubtractionGameProps> = ({ showSocialShare = tru
|
|||
<div className="bg-card rounded-lg p-8 shadow-lg">
|
||||
<div className="flex flex-wrap justify-center gap-3">
|
||||
{circles.map((_, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={getCircleClass(index)}
|
||||
onClick={() => handleCircleClick(index)}
|
||||
onMouseEnter={() => (highlightedIndices.includes(index) && !removedCircles.has(index)) ? setHoveredIndex(index) : null}
|
||||
onMouseLeave={() => setHoveredIndex(null)}
|
||||
title={highlightedIndices.includes(index) ? 'Click to select' : 'Not selectable'}
|
||||
/>
|
||||
<div key={index} className="flex flex-col items-center">
|
||||
<div
|
||||
className={getCircleClass(index)}
|
||||
onClick={() => handleCircleClick(index)}
|
||||
onMouseEnter={() => (highlightedIndices.includes(index) && !removedCircles.has(index)) ? setHoveredIndex(index) : null}
|
||||
onMouseLeave={() => setHoveredIndex(null)}
|
||||
title={highlightedIndices.includes(index) ? 'Click to select' : 'Not selectable'}
|
||||
/>
|
||||
<span className="text-xs text-black dark:text-white mt-1 font-medium">
|
||||
{index + 1}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue