feat: make shortcut tag configurable
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
kolaente 2021-11-13 17:18:10 +01:00
parent 9380332b97
commit d926c4b99d
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 7 additions and 2 deletions

View File

@ -16,6 +16,7 @@
<template v-for="(sc, si) in s.shortcuts" :key="si">
<dt>{{ $t(sc.title) }}</dt>
<shortcut
is="dd"
:keys="sc.keys"
:combination="typeof sc.combination !== 'undefined' ? $t(`keyboardShortcuts.${sc.combination}`) : null"/>
</template>

View File

@ -1,10 +1,10 @@
<template>
<dd class="shortcuts">
<component :is="is" class="shortcuts">
<template v-for="(k, i) in keys" :key="i">
<kbd>{{ k }}</kbd>
<span v-if="i < keys.length - 1">{{ combination }}</span>
</template>
</dd>
</component>
</template>
<script>
@ -19,6 +19,10 @@ export default {
type: String,
default: '+',
},
is: {
type: String,
default: 'div',
}
},
}
</script>