Greatly simplify stat reduction input
This commit is contained in:
parent
0fa0858a3c
commit
f648fe8a0c
@ -14,6 +14,11 @@ import {
|
|||||||
ModalFooter,
|
ModalFooter,
|
||||||
ModalHeader,
|
ModalHeader,
|
||||||
ModalOverlay,
|
ModalOverlay,
|
||||||
|
NumberDecrementStepper,
|
||||||
|
NumberIncrementStepper,
|
||||||
|
NumberInput,
|
||||||
|
NumberInputField,
|
||||||
|
NumberInputStepper,
|
||||||
Stack,
|
Stack,
|
||||||
StackDivider,
|
StackDivider,
|
||||||
Text,
|
Text,
|
||||||
@ -113,6 +118,18 @@ export default function (props: GameAppealProps & { port?: MessagePort }) {
|
|||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<VStack spacing={4}>
|
<VStack spacing={4}>
|
||||||
|
<NumberInput
|
||||||
|
max={10}
|
||||||
|
min={-10}
|
||||||
|
onChange={(_, n) => setPercentage(n)}
|
||||||
|
precision={0}
|
||||||
|
>
|
||||||
|
<NumberInputField />
|
||||||
|
<NumberInputStepper>
|
||||||
|
<NumberIncrementStepper />
|
||||||
|
<NumberDecrementStepper />
|
||||||
|
</NumberInputStepper>
|
||||||
|
</NumberInput>
|
||||||
<Input
|
<Input
|
||||||
onBeforeInput={(e) => {
|
onBeforeInput={(e) => {
|
||||||
const value = (e.target as EventTarget & { value: string })
|
const value = (e.target as EventTarget & { value: string })
|
||||||
@ -122,7 +139,6 @@ export default function (props: GameAppealProps & { port?: MessagePort }) {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}}
|
}}
|
||||||
onChange={(e) => setPercentage(parseInt(e.target.value))}
|
onChange={(e) => setPercentage(parseInt(e.target.value))}
|
||||||
pattern="/^-?\d{0,3}$/"
|
|
||||||
placeholder="Reduction factor"
|
placeholder="Reduction factor"
|
||||||
/>
|
/>
|
||||||
<Text alignSelf="start">Stat multiplication factors:</Text>
|
<Text alignSelf="start">Stat multiplication factors:</Text>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user