From 60cb453847f0968a4d1abc0fbb66773a54ebdfd9 Mon Sep 17 00:00:00 2001 From: MAZE Date: Mon, 1 Jul 2024 18:54:09 +0330 Subject: [PATCH] feat: add shortcut for breathing exercise --- src/components/menu/items/breathing-exercise.tsx | 4 ++-- src/components/menu/menu.tsx | 1 + src/components/modals/shortcuts/shortcuts.tsx | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/menu/items/breathing-exercise.tsx b/src/components/menu/items/breathing-exercise.tsx index 6d5dce4..5695afb 100644 --- a/src/components/menu/items/breathing-exercise.tsx +++ b/src/components/menu/items/breathing-exercise.tsx @@ -1,4 +1,4 @@ -import { MdOutlineTimer } from 'react-icons/md/index'; +import { IoMdFlower } from 'react-icons/io/index'; import { Item } from '../item'; @@ -9,7 +9,7 @@ interface BreathingExerciseProps { export function BreathingExercise({ open }: BreathingExerciseProps) { return ( } + icon={} label="Breathing Exercise" shortcut="Shift + B" onClick={open} diff --git a/src/components/menu/menu.tsx b/src/components/menu/menu.tsx index 2692861..86614b6 100644 --- a/src/components/menu/menu.tsx +++ b/src/components/menu/menu.tsx @@ -76,6 +76,7 @@ export function Menu() { useHotkeys('shift+n', () => open('notepad')); useHotkeys('shift+p', () => open('pomodoro')); useHotkeys('shift+c', () => open('countdownTimer')); + useHotkeys('shift+b', () => open('breathingExercise')); useHotkeys('shift+alt+p', () => open('presets')); useHotkeys('shift+h', () => open('shortcuts')); useHotkeys('shift+s', () => open('shareLink'), { enabled: !noSelected }); diff --git a/src/components/modals/shortcuts/shortcuts.tsx b/src/components/modals/shortcuts/shortcuts.tsx index 678d37a..aa8efde 100644 --- a/src/components/modals/shortcuts/shortcuts.tsx +++ b/src/components/modals/shortcuts/shortcuts.tsx @@ -29,6 +29,10 @@ export function ShortcutsModal({ onClose, show }: ShortcutsModalProps) { keys: ['Shift', 'P'], label: 'Pomodoro Timer', }, + { + keys: ['Shift', 'B'], + label: 'Breathing Exercise', + }, { keys: ['Shift', 'C'], label: 'Countdown Timer',