Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96bed93

Browse files
authored
docs: improve tutorial
1 parent 8dc4812 commit 96bed93

File tree

1 file changed

+17
-0
lines changed
  • packages/docsite/markdown/docs/00 Quick Start

1 file changed

+17
-0
lines changed

packages/docsite/markdown/docs/00 Quick Start/Tutorial.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,23 @@ import { canMoveKnight, moveKnight } from './Game'
662662
import { ItemTypes } from './Constants'
663663
import { useDrop } from 'react-dnd'
664664

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+
665682
function BoardSquare({ x, y, children }) {
666683
const black = (x + y) % 2 === 1
667684
const [{ isOver, canDrop }, drop] = useDrop(

0 commit comments

Comments
 (0)