blob: 759dcf3589db4c11678d663fbfe7ec96f0aed69c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import React from "react";
import {Rect} from "react-konva";
import {ROOM_DEFAULT_COLOR} from "../../../colors/index";
import Shapes from "../../../shapes/index";
import {TILE_SIZE_IN_PIXELS} from "../MapConstants";
const RoomTile = ({tile}) => (
<Rect
x={tile.positionX * TILE_SIZE_IN_PIXELS}
y={tile.positionY * TILE_SIZE_IN_PIXELS}
width={TILE_SIZE_IN_PIXELS}
height={TILE_SIZE_IN_PIXELS}
fill={ROOM_DEFAULT_COLOR}
/>
);
RoomTile.propTypes = {
tile: Shapes.Tile,
};
export default RoomTile;
|