From c0b7b7a04808e179f56e9fd211d35b060aa44162 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Tue, 20 Jun 2023 11:38:05 +0200 Subject: [PATCH] make disabled tactics clickable --- client/src/components/Inventory.tsx | 2 +- client/src/components/inventory.css | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/src/components/Inventory.tsx b/client/src/components/Inventory.tsx index 0b590b7..02d660f 100644 --- a/client/src/components/Inventory.tsx +++ b/client/src/components/Inventory.tsx @@ -86,7 +86,7 @@ function InventoryItem({name, displayName, locked, disabled, newly, showDoc}) { disabled ? "Not available in this level" : "" const handleClick = () => { - if (!locked && !disabled) { + if (!locked) { showDoc() } } diff --git a/client/src/components/inventory.css b/client/src/components/inventory.css index 13c0cc2..bb4eda5 100644 --- a/client/src/components/inventory.css +++ b/client/src/components/inventory.css @@ -29,17 +29,20 @@ padding: .1em .5em; } -.inventory .item.locked, -.inventory .item.disabled { +.inventory .item.locked { border: solid 1px #ccc; color: #ccc; } +.inventory .item.disabled { + color: #d92c2c; +} + .inventory .item.new { background-color: rgb(255, 242, 190); } -.inventory .item:not(.locked):not(.disabled) { +.inventory .item:not(.locked) { cursor: pointer; }