mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: percentage
This commit is contained in:
1 parent
1b88773e28
commit
ecc029402e
1 file changed
+14
-8
@@ -179,11 +179,7 @@ export default function Page() {
|
||||
height: '100%',
|
||||
}}
|
||||
>
|
||||
<Text
|
||||
style={{
|
||||
textAlign: 'center',
|
||||
}}
|
||||
>
|
||||
<Text style={{ textAlign: 'center' }} wrap="nowrap">
|
||||
{display
|
||||
? display(stats[index])
|
||||
: decimals === undefined
|
||||
@@ -206,6 +202,16 @@ export default function Page() {
|
||||
)
|
||||
</Text>
|
||||
)}
|
||||
|
||||
{deltaMode === 'percentage' && (
|
||||
<Text color="gray">
|
||||
(
|
||||
{`${deltaPercentage > 0 ? '+' : ''}${Math.round(
|
||||
deltaPercentage * 100,
|
||||
)}%`}
|
||||
)
|
||||
</Text>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Flex>
|
||||
@@ -416,17 +422,17 @@ export default function Page() {
|
||||
<Row name="Speed backwards" value="speedBackwards" decimals={0} />
|
||||
<Row name="Engine power" value="enginePower" decimals={0} />
|
||||
<Row
|
||||
name="Power to weight ratio on hard terrain"
|
||||
name="Power to weight ratio hard terrain"
|
||||
value="powerToWeightRatioHardTerrain"
|
||||
decimals={1}
|
||||
/>
|
||||
<Row
|
||||
name="Power to weight ratio on medium terrain"
|
||||
name="Power to weight ratio medium terrain"
|
||||
value="powerToWeightRatioMediumTerrain"
|
||||
decimals={1}
|
||||
/>
|
||||
<Row
|
||||
name="Power to weight ratio on soft terrain"
|
||||
name="Power to weight ratio soft terrain"
|
||||
value="powerToWeightRatioSoftTerrain"
|
||||
decimals={1}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user