Added token images

This commit is contained in:
Mitchell McCaffrey 2020-03-19 21:40:29 +11:00
parent f2c3a12856
commit a22b3231fb
23 changed files with 72 additions and 3 deletions

View File

@ -1,8 +1,32 @@
import React from "react";
import { Box } from "theme-ui";
import { Flex, Image } from "theme-ui";
import * as tokens from "../tokens";
// import Token from "./Token";
function Tokens() {
return <Box bg="background" sx={{ width: "128px", minWidth: "128px" }} />;
return (
<Flex
bg="background"
sx={{
width: "80px",
minWidth: "80px",
flexDirection: "column",
overflow: "auto"
}}
px={2}
>
{Object.entries(tokens).map(([id, image]) => (
<Image
p={2}
key={id}
src={image}
sx={{ width: "64px", height: "64px" }}
/>
))}
</Flex>
);
}
export default Tokens;

View File

@ -85,7 +85,9 @@ function Game() {
>
<AddMapButton handleMapChange={handleMapChange} />
</Box>
<Flex sx={{ justifyContent: "space-between", flexGrow: 1 }}>
<Flex
sx={{ justifyContent: "space-between", flexGrow: 1, height: "100%" }}
>
<Party streams={streams} localStreamId={peerId} />
<Map imageSource={imageSource} />
<Tokens />

BIN
src/tokens/Axes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
src/tokens/Bird.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
src/tokens/Book.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
src/tokens/Crown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
src/tokens/Dragon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
src/tokens/Eye.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
src/tokens/Fist.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
src/tokens/Horse.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
src/tokens/Leaf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
src/tokens/Lion.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
src/tokens/Money.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
src/tokens/Moon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
src/tokens/Potion.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
src/tokens/Shield.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
src/tokens/Skull.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
src/tokens/Snake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
src/tokens/Sun.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
src/tokens/Swords.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
src/tokens/Tree.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
src/tokens/Triangle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

43
src/tokens/index.js Normal file
View File

@ -0,0 +1,43 @@
import axes from "./Axes.png";
import bird from "./Bird.png";
import book from "./Book.png";
import crown from "./Crown.png";
import dragon from "./Dragon.png";
import eye from "./Eye.png";
import fist from "./Fist.png";
import horse from "./Horse.png";
import leaf from "./Leaf.png";
import lion from "./Lion.png";
import money from "./Money.png";
import moon from "./Moon.png";
import potion from "./Potion.png";
import shield from "./Shield.png";
import skull from "./Skull.png";
import snake from "./Snake.png";
import sun from "./Sun.png";
import swords from "./Swords.png";
import tree from "./Tree.png";
import triangle from "./Triangle.png";
export {
axes,
bird,
book,
crown,
dragon,
eye,
fist,
horse,
leaf,
lion,
money,
moon,
potion,
shield,
skull,
snake,
sun,
swords,
tree,
triangle
};