feat(Kbd): add color prop

This commit is contained in:
Benjamin Canac
2024-04-05 15:43:41 +02:00
parent 06ea029ef6
commit 2cc41dedcf
5 changed files with 50 additions and 12 deletions

View File

@@ -13,6 +13,7 @@ type KbdVariants = VariantProps<typeof kbd>
export interface KbdProps extends Omit<PrimitiveProps, 'asChild'> {
value?: string
color?: KbdVariants['color']
size?: KbdVariants['size']
class?: any
}
@@ -30,7 +31,7 @@ defineSlots<KbdSlots>()
</script>
<template>
<Primitive :as="as" :class="kbd({ size, class: props.class })">
<Primitive :as="as" :class="kbd({ color, size, class: props.class })">
<slot>
{{ value }}
</slot>