mark tabs with new theorems
This commit is contained in:
@@ -76,9 +76,10 @@ function InventoryList({items, docType, openDoc, tab=null, setTab=undefined, lev
|
|||||||
return <>
|
return <>
|
||||||
{categories.length > 1 &&
|
{categories.length > 1 &&
|
||||||
<div className="tab-bar">
|
<div className="tab-bar">
|
||||||
{categories.map((cat) =>
|
{categories.map((cat) => {
|
||||||
<div key={`category-${cat}`} className={`tab ${cat == (tab ?? categories[0]) ? "active": ""}`}
|
let hasNew = modifiedItems.filter(item => item.new && (cat == item.category)).length > 0
|
||||||
onClick={() => { setTab(cat) }}>{cat}</div>)}
|
return <div key={`category-${cat}`} className={`tab${cat == (tab ?? categories[0]) ? " active": ""}${hasNew ? " new": ""}`}
|
||||||
|
onClick={() => { setTab(cat) }}>{cat}</div>})}
|
||||||
</div>}
|
</div>}
|
||||||
<div className="inventory-list">
|
<div className="inventory-list">
|
||||||
{[...modifiedItems].sort(
|
{[...modifiedItems].sort(
|
||||||
|
|||||||
@@ -72,6 +72,14 @@
|
|||||||
border-bottom: 0.3em solid var(--clr-primary);
|
border-bottom: 0.3em solid var(--clr-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inventory .tab.new {
|
||||||
|
background-image: linear-gradient(to bottom, rgba(255,0,0,0), rgb(255, 242, 190));
|
||||||
|
}
|
||||||
|
|
||||||
|
.inventory .tab.new:not(.active) {
|
||||||
|
border-bottom: 0.3em solid rgb(255, 242, 190);
|
||||||
|
}
|
||||||
|
|
||||||
.tab.active {
|
.tab.active {
|
||||||
color: black;
|
color: black;
|
||||||
border-bottom: 0.3em solid #999;
|
border-bottom: 0.3em solid #999;
|
||||||
|
|||||||
Reference in New Issue
Block a user