mirror of
https://github.com/suitenumerique/meet.git
synced 2026-07-27 04:09:26 +00:00
wip introduce shortcut to open chat
This commit is contained in:
@@ -6,6 +6,7 @@ import { ToggleButton } from '@/primitives'
|
||||
import { chatStore } from '@/stores/chat'
|
||||
import { useSidePanel } from '../../hooks/useSidePanel'
|
||||
import { ToggleButtonProps } from '@/primitives/ToggleButton'
|
||||
import { useRegisterKeyboardShortcut } from '@/features/shortcuts/useRegisterKeyboardShortcut'
|
||||
|
||||
export const ChatToggle = ({
|
||||
onPress,
|
||||
@@ -18,6 +19,12 @@ export const ChatToggle = ({
|
||||
const { isChatOpen, toggleChat } = useSidePanel()
|
||||
const tooltipLabel = isChatOpen ? 'open' : 'closed'
|
||||
|
||||
const shortcut = {
|
||||
key: 'c',
|
||||
ctrlKey: true,
|
||||
}
|
||||
useRegisterKeyboardShortcut({ shortcut, handler: toggleChat })
|
||||
|
||||
return (
|
||||
<div
|
||||
className={css({
|
||||
|
||||
Reference in New Issue
Block a user