Skip to content

Commit fed16db

Browse files
committed
fix(timer): resolve an issue that time was running to fast
1 parent 8b98cf1 commit fed16db

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/gold-poets-say.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@zag-js/timer": patch
3+
---
4+
5+
set default interval value from 250 to 1000

packages/machines/timer/src/timer.machine.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Time, TimerSchema } from "./timer.types"
55
export const machine = createMachine<TimerSchema>({
66
props({ props }) {
77
return {
8-
interval: 250,
8+
interval: 1000,
99
...props,
1010
}
1111
},

packages/machines/timer/src/timer.types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export interface TimerProps extends CommonProperties {
5555
autoStart?: boolean | undefined
5656
/**
5757
* The interval in milliseconds to update the timer count.
58-
* @default 250
58+
* @default 1000
5959
*/
6060
interval?: number | undefined
6161
/**

0 commit comments

Comments
 (0)