Move up and down with j and k

This commit is contained in:
Jeffrey Biles
2020-03-18 17:29:21 -07:00
parent f1f0a502b2
commit a6320cebce
2 changed files with 18 additions and 4 deletions

View File

@@ -8,8 +8,15 @@
<script>
import marked from 'marked';
import { useKeydown } from '../composition/useKeydown';
export default {
setup({email}) {
setup({email}, {emit}) {
useKeydown([
{key: 'k', fn: () => emit('changeEmail', {amount: -1})},
{key: 'j', fn: () => emit('changeEmail', {amount: 1})}
])
let emailMarkdown = marked(email.body);
return {
emailMarkdown