mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 08:54:13 +00:00
19 lines
303 B
TypeScript
19 lines
303 B
TypeScript
import { create } from 'zustand';
|
|
|
|
interface AlarmStore {
|
|
isPlaying: boolean;
|
|
play: () => void;
|
|
stop: () => void;
|
|
}
|
|
|
|
export const useAlarmStore = create<AlarmStore>()(set => ({
|
|
isPlaying: false,
|
|
|
|
play() {
|
|
set({ isPlaying: true });
|
|
},
|
|
|
|
stop() {
|
|
set({ isPlaying: false });
|
|
},
|
|
}));
|