IKHSAN
ENID Baca dalam Bahasa Indonesia

opendesk

Public
Branch
main
Latest commit
08d9f3328 October 2026

ShortcutKey.vue

Open raw
<template>
  <span class="inline-flex items-center gap-1">
    <kbd
      v-for="(key, index) in keyList"
      :key="index"
      class="flex items-center justify-center border border-outline-gray-2 bg-surface-base pt-px text-ink-gray-5"
      :class="
        size === 'sm'
          ? 'h-4 min-w-4 rounded-[4px] px-0.5 text-[10px]'
          : 'h-5 min-w-5 rounded-[5px] px-1 text-xs'
      "
    >
      {{ key }}
    </kbd>
  </span>
</template>

<script setup lang="ts">
import { computed } from "vue";

/** Space-separated keys render as separate caps: "L A" -> [L][A]. */
const props = defineProps<{ keys: string; size?: "sm" }>();

const keyList = computed(() => props.keys.trim().split(/\s+/));
</script>
bytes
715
lines
26
Type
vue
Latest commit
28 October 2026