combo styles

This commit is contained in:
ntr
2019-11-12 19:49:07 +11:00
parent 9bcea878ec
commit d3a4f3e615
3 changed files with 55 additions and 27 deletions
+15 -20
View File
@@ -88,7 +88,7 @@ class InfoComponent extends preact.Component {
while (infoName.includes('Plus')) infoName = infoName.replace('Plus', '+');
const itemSource = itemInfo.combos.filter(c => c.item === removeTier(fullInfo.item));
let itemSourceInfo = itemSource.length && !isSpec
? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}`
: false;
@@ -133,7 +133,7 @@ class InfoComponent extends preact.Component {
const Combos = () => {
if (tutorial && instance.time_control === 'Practice' && instance.rounds.length === 1) return false;
const generalNotes = (
<div class="combos">
<div>
<h2> General </h2>
<p>
You can preview combos by clicking the combined item when it appears in this section. <br />
@@ -148,24 +148,19 @@ class InfoComponent extends preact.Component {
if (vboxCombos.length > 6 || vboxCombos.length === 0) return generalNotes;
return (
<table class="combos">
<tbody>
{vboxCombos.map((c, i) =>
<td><table>
<tr class="table-button"
onMouseOver={e => {
e.stopPropagation();
this.setState({ comboItem: c.item });
}}
onClick={() => setInfo(c.item)}
> {convertItem(c.item)} </tr>
{c.components.map((u, j) => <tr key={j} >{convertItem(u)}</tr>)}
</table>
</td>
)}
</tbody>
</table>
<div class="combos">
{vboxCombos.map((c, i) =>
<div class="table-button"
onMouseOver={e => {
e.stopPropagation();
this.setState({ comboItem: c.item });
}}
onClick={() => setInfo(c.item)}>
<div class="item">{convertItem(c.item)}</div>
{c.components.map((u, j) => <div key={j} >{convertItem(u)}</div>)}
</div>
)}
</div>
);
};