We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 895b1a5 commit 7d677baCopy full SHA for 7d677ba
src/App.tsx
@@ -14,8 +14,15 @@ export const App: React.FC = () => {
14
<span className="text label" id="total-minutes">
15
Total Time Estimate (in minutes)
16
</span>
17
- <Minutes value={totalMinutes} onValueChange={setTotalMinutes}>
18
- <MinutesSubtract />
+ <Minutes
+ value={totalMinutes}
19
+ onValueChange={(newValue) => {
20
+ if (completedMinutes <= newValue) {
21
+ setTotalMinutes(newValue);
22
+ }
23
+ }}
24
+ >
25
+ <MinutesSubtract disabled={totalMinutes === completedMinutes} />
26
<MinutesInput aria-labelledby="total-minutes" />
27
<MinutesAdd />
28
</Minutes>
0 commit comments