Add shortcut
This commit is contained in:
@ -69,7 +69,12 @@ type Props = {
|
||||
}
|
||||
|
||||
@keydown('shift+/')
|
||||
goToOpenKeyboardShortcuts() {
|
||||
openKeyboardShortcuts() {
|
||||
this.props.ui.setActiveModal('keyboard-shortcuts');
|
||||
}
|
||||
|
||||
@keydown('shift+3')
|
||||
openMarkdownShortcuts() {
|
||||
this.props.ui.setActiveModal('markdown-shortcuts');
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ import Settings from 'scenes/Settings';
|
||||
<Modal name="keyboard-shortcuts" title="Keyboard shortcuts">
|
||||
<KeyboardShortcuts />
|
||||
</Modal>
|
||||
<Modal name="markdown-shortcuts" title="Markdown shortcuts">
|
||||
<Modal name="markdown-shortcuts" title="Markdown formatting">
|
||||
<MarkdownShortcuts />
|
||||
</Modal>
|
||||
<Modal name="settings" title="Settings">
|
||||
|
@ -18,7 +18,7 @@ type Props = {
|
||||
const Modal = ({
|
||||
children,
|
||||
isOpen,
|
||||
title = 'Untitled Modal',
|
||||
title = 'Untitled',
|
||||
onRequestClose,
|
||||
...rest
|
||||
}: Props) => {
|
||||
|
@ -36,6 +36,9 @@ function KeyboardShortcuts() {
|
||||
|
||||
<Keys><Key>?</Key></Keys>
|
||||
<Label>Open this guide</Label>
|
||||
|
||||
<Keys><Key>#</Key></Keys>
|
||||
<Label>Open markdown guide</Label>
|
||||
</List>
|
||||
</Flex>
|
||||
);
|
||||
|
Reference in New Issue
Block a user