forked from vikunja/frontend
adrinux
46fa43d67f
Co-authored-by: Adrian Simmons <adrian@perlucida.co.uk> Co-authored-by: Dominik Pschenitschni <mail@celement.de> Co-authored-by: kolaente <k@knt.li> Reviewed-on: vikunja/frontend#954 Reviewed-by: dpschen <dpschen@noreply.kolaente.de> Reviewed-by: konrad <k@knt.li> Co-authored-by: adrinux <adrian@perlucida.co.uk> Co-committed-by: adrinux <adrian@perlucida.co.uk>
47 lines
705 B
Vue
47 lines
705 B
Vue
<template>
|
|
<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>
|
|
</component>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'shortcut',
|
|
props: {
|
|
keys: {
|
|
type: Array,
|
|
required: true,
|
|
},
|
|
combination: {
|
|
type: String,
|
|
default: '+',
|
|
},
|
|
is: {
|
|
type: String,
|
|
default: 'div',
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.shortcuts {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
kbd {
|
|
padding: .1rem .35rem;
|
|
border: 1px solid var(--grey-300);
|
|
background: var(--grey-100);
|
|
border-radius: 3px;
|
|
font-size: .75rem;
|
|
}
|
|
|
|
span {
|
|
padding: 0 .25rem;
|
|
}
|
|
</style> |