Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dc4812 commit 96bed93Copy full SHA for 96bed93
packages/docsite/markdown/docs/00 Quick Start/Tutorial.md
@@ -662,6 +662,23 @@ import { canMoveKnight, moveKnight } from './Game'
662
import { ItemTypes } from './Constants'
663
import { useDrop } from 'react-dnd'
664
665
+const Overlay = ({color}) => {
666
+ return (
667
+ <div
668
+ style={{
669
+ position: 'absolute',
670
+ top: 0,
671
+ left: 0,
672
+ height: '100%',
673
+ width: '100%',
674
+ zIndex: 1,
675
+ opacity: 0.5,
676
+ backgroundColor: color,
677
+ }}
678
+ />
679
+ )
680
+}
681
+
682
function BoardSquare({ x, y, children }) {
683
const black = (x + y) % 2 === 1
684
const [{ isOver, canDrop }, drop] = useDrop(
0 commit comments