Added full screen button

This commit is contained in:
Mitchell McCaffrey
2020-09-06 15:18:05 +10:00
parent 24a3387b51
commit 58cb92d432
7 changed files with 138 additions and 56 deletions

View File

@@ -9,6 +9,7 @@ import ProxyToken from "./ProxyToken";
import SelectTokensButton from "./SelectTokensButton";
import { fromEntries } from "../../helpers/shared";
import useSetting from "../../helpers/useSetting";
import AuthContext from "../../contexts/AuthContext";
import TokenDataContext from "../../contexts/TokenDataContext";
@@ -18,6 +19,7 @@ const listTokenClassName = "list-token";
function Tokens({ onMapTokenStateCreate }) {
const { userId } = useContext(AuthContext);
const { ownedTokens, tokens } = useContext(TokenDataContext);
const [fullScreen] = useSetting("map.fullScreen");
function handleProxyDragEnd(isOnMap, token) {
if (isOnMap && onMapTokenStateCreate) {
@@ -48,6 +50,7 @@ function Tokens({ onMapTokenStateCreate }) {
width: "80px",
minWidth: "80px",
overflow: "hidden",
display: fullScreen ? "none" : "block",
}}
>
<SimpleBar style={{ height: "calc(100% - 48px)", overflowX: "hidden" }}>