mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 06:51:46 +01:00
fix(Kbd): optional value prop when using default slot
This commit is contained in:
@@ -35,7 +35,10 @@ const _useKbd = () => {
|
||||
metaSymbol.value = macOS.value ? kbdKeysMap.command : kbdKeysMap.ctrl
|
||||
})
|
||||
|
||||
function getKbdKey(value: KbdKey | string) {
|
||||
function getKbdKey(value?: KbdKey | string) {
|
||||
if (!value) {
|
||||
return
|
||||
}
|
||||
if (value === 'meta') {
|
||||
return metaSymbol.value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user