2023-04-14 02:01:55 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
2023-04-15 19:37:50 +02:00
|
|
|
export default function Cell({spec, rowIndex, cellIndex, showSolution}) {
|
2023-04-14 02:01:55 +02:00
|
|
|
let classes = "cell r" + rowIndex + " c" + cellIndex;
|
|
|
|
if (spec.top) classes += " top";
|
|
|
|
if (spec.right) classes += " right";
|
|
|
|
if (spec.bottom) classes += " bottom";
|
|
|
|
if (spec.left) classes += " left";
|
2023-04-15 19:37:50 +02:00
|
|
|
if (spec.solution && showSolution) classes += " solution";
|
2023-04-14 02:01:55 +02:00
|
|
|
if (spec.user) classes += " user";
|
|
|
|
return (
|
2023-04-15 19:37:50 +02:00
|
|
|
<div className={classes}/>
|
2023-04-14 02:01:55 +02:00
|
|
|
);
|
|
|
|
}
|