Skip to content

Commit

Permalink
finish making the dots
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel264 committed Sep 26, 2024
1 parent eec650a commit 5b573bf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/DotGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ const DotGrid = () => {

for (let i = 0; i < GRID_WIDTH; i++) {
for (let j = 0; j < GRID_HEIGHT; j++) {
// dots.push(
// <Dot key={index} x={i} y={j} />
// );
// index++;
dots.push(
<div className="cursor-crosshair rounded-full p-2 transition-colors hover:bg-slate-600" data-index={index} key={`${i}-${j}`}>
<div className="dot-point h-2 w-2 rounded-full bg-gradient-to-b from-slate-700 to-slate-400 opacity-50" data-index={index} />
</div>
);
index++;
}
}
return <div></div>;
return <div style={{ gridTemplateColumns: `repeat(${GRID_WIDTH}, 1fr)` }}>{dots}</div>;
};

export default WaterDropGrid;

0 comments on commit 5b573bf

Please sign in to comment.