feat: add countdown timer button

This commit is contained in:
MAZE 2024-05-09 20:51:57 +03:30
parent 7cb0f1c752
commit 5f066a4eff
5 changed files with 24 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import { FiExternalLink } from 'react-icons/fi/index';
import { Item as DropdownItem } from '@radix-ui/react-dropdown-menu';
import styles from './item.module.css';
@ -37,6 +38,12 @@ export function Item({
</span>
{shortcut && <span className={styles.shortcut}>{shortcut}</span>}
{href && (
<span className={styles.external}>
<FiExternalLink />
</span>
)}
</Comp>
</DropdownItem>
);

View file

@ -0,0 +1,13 @@
import { MdOutlineTimer } from 'react-icons/md/index';
import { Item } from '../item';
export function CountdownTimer() {
return (
<Item
href="https://timesy.app"
icon={<MdOutlineTimer />}
label="Countdown Timer"
/>
);
}

View file

@ -7,3 +7,4 @@ export { Pomodoro as PomodoroItem } from './pomodoro';
export { Presets as PresetsItem } from './presets';
export { Shortcuts as ShortcutsItem } from './shortcuts';
export { SleepTimer as SleepTimerItem } from './sleep-timer';
export { CountdownTimer as CountdownTimerItem } from './countdown-timer';

View file

@ -10,7 +10,7 @@ export function SleepTimer({ open }: SleepTimerProps) {
return (
<Item
icon={<IoMoonSharp />}
label="Sleep timer"
label="Sleep Timer"
shortcut="Shift + T"
onClick={open}
/>

View file

@ -14,6 +14,7 @@ import {
PresetsItem,
ShortcutsItem,
SleepTimerItem,
CountdownTimerItem,
} from './items';
import { Divider } from './divider';
import { ShareLinkModal } from '@/components/modals/share-link';
@ -110,6 +111,7 @@ export function Menu() {
<Divider />
<NotepadItem open={() => open('notepad')} />
<PomodoroItem open={() => open('pomodoro')} />
<CountdownTimerItem />
<Divider />
<ShortcutsItem open={() => open('shortcuts')} />