2021-01-17 18:57:57 +01:00
|
|
|
<template>
|
|
|
|
<span class="shortcuts">
|
|
|
|
<template v-for="(k, i) in keys">
|
2021-09-24 20:08:48 +02:00
|
|
|
<kbd :key="i">{{ k }}</kbd>
|
|
|
|
<span v-if="i < keys.length - 1" :key="`plus${i}`">+</span>
|
2021-01-17 18:57:57 +01:00
|
|
|
</template>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'shortcut',
|
|
|
|
props: {
|
|
|
|
keys: {
|
|
|
|
type: Array,
|
|
|
|
required: true,
|
2021-07-17 23:21:46 +02:00
|
|
|
},
|
2021-01-17 18:57:57 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
2021-09-24 20:08:48 +02:00
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.shortcuts {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
kbd {
|
|
|
|
padding: .1rem .35rem;
|
|
|
|
border: 1px solid $grey-300;
|
|
|
|
background: $grey-100;
|
|
|
|
border-radius: 3px;
|
|
|
|
font-size: .75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
span {
|
|
|
|
padding: 0 .25rem;
|
|
|
|
}
|
|
|
|
</style>
|