moodist/src/components/toolbar/menu/items/sleep-timer.tsx
2024-08-31 19:25:51 +03:30

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}
/>
);
}