more description improvements
This commit is contained in:
@@ -204,7 +204,10 @@ class InfoComponent extends preact.Component {
|
||||
);
|
||||
}
|
||||
const cost = fullInfo.cost ? `- ${fullInfo.cost}b` : false;
|
||||
const infoDescription = reactStringReplace(fullInfo.description, '\n', () => <br />);
|
||||
|
||||
const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat|POWER|SPEED|LIFE)/;
|
||||
let infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
|
||||
infoDescription = reactStringReplace(infoDescription, '\n', () => <br />);
|
||||
return (
|
||||
<div class="info-item">
|
||||
<h2>{fullInfo.item} {cost}</h2>
|
||||
|
||||
@@ -35,7 +35,9 @@ module.exports = {
|
||||
BluePower: () => circle(['blue']),
|
||||
SpeedStat: () => triangle(['white']),
|
||||
|
||||
|
||||
POWER: () => circle(['white']),
|
||||
LIFE: () => square(['white']),
|
||||
SPEED: () => triangle(['white']),
|
||||
// specs
|
||||
// Base
|
||||
|
||||
|
||||
Reference in New Issue
Block a user