(value: ValueParam)
| 39 | }); |
| 40 | |
| 41 | const setValue = (value: ValueParam) => { |
| 42 | setCurrent((c) => { |
| 43 | const target = isNumber(value) ? value : value(c); |
| 44 | return getTargetValue(target, { |
| 45 | max, |
| 46 | min, |
| 47 | }); |
| 48 | }); |
| 49 | }; |
| 50 | |
| 51 | const inc = (delta: number = 1) => { |
| 52 | setValue((c) => c + delta); |
no test coverage detected
searching dependent graphs…