mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 08:54:13 +00:00
22 lines
480 B
TypeScript
22 lines
480 B
TypeScript
import { IoMoonSharp } from 'react-icons/io5/index';
|
|
|
|
import { useSleepTimerStore } from '@/stores/sleep-timer';
|
|
import { Item } from '../item';
|
|
|
|
interface SleepTimerProps {
|
|
open: () => void;
|
|
}
|
|
|
|
export function SleepTimer({ open }: SleepTimerProps) {
|
|
const active = useSleepTimerStore(state => state.active);
|
|
|
|
return (
|
|
<Item
|
|
active={active}
|
|
icon={<IoMoonSharp />}
|
|
label="Sleep Timer"
|
|
shortcut="Shift + Alt + T"
|
|
onClick={open}
|
|
/>
|
|
);
|
|
}
|