diff --git a/packages/paste-core/components/keyboard-key/src/KeyboardKey.tsx b/packages/paste-core/components/keyboard-key/src/KeyboardKey.tsx index 6ef2e0c7f6..9d3a593a61 100644 --- a/packages/paste-core/components/keyboard-key/src/KeyboardKey.tsx +++ b/packages/paste-core/components/keyboard-key/src/KeyboardKey.tsx @@ -58,11 +58,11 @@ export interface KeyboardKeyProps extends HTMLPasteProps<"kbd"> { * @type string * @memberof KeyboardKeyProps */ - keyText?: string; + keyEvent?: string; } const KeyboardKey = React.forwardRef( - ({ element = "KEYBOARD_KEY", keyText, ...props }, ref) => { + ({ element = "KEYBOARD_KEY", keyEvent, ...props }, ref) => { const { disabled, activeKeys, @@ -71,7 +71,7 @@ const KeyboardKey = React.forwardRef( } = React.useContext(KeyboardKeyCombinationContext); const isKeyActive = - !disabled && activeKeys && keyText && activeKeys.map((k) => k.toLowerCase()).includes(keyText.toLowerCase()); + !disabled && activeKeys && keyEvent && activeKeys.map((k) => k.toLowerCase()).includes(keyEvent.toLowerCase()); return ( { Default/pressed - Control - B + Control + B @@ -43,8 +43,8 @@ export const Default = (): React.ReactElement => { Disabled - Control - B + Control + B @@ -70,8 +70,8 @@ export const Inverse = (): React.ReactElement => { Default/pressed - Control - B + Control + B @@ -79,8 +79,8 @@ export const Inverse = (): React.ReactElement => { Disabled - Control - B + Control + B @@ -102,12 +102,12 @@ export const ForcePressed = (): React.ReactElement => { - Control - B + Control + B - Control - B + Control + B @@ -157,25 +157,25 @@ export const MultipleCombinations = (): React.ReactElement => { - Control - B + Control + B - Control - K + Control + K - Cmd - B + Cmd + B - Cmd - K + Cmd + K - Cmd - Shift - P + Cmd + Shift + P
@@ -198,8 +198,8 @@ export const TriggerModal = (): React.ReactElement => { Use the following shortcut to open a modal: - Control - K + Control + K setIsOpen(false)} size="default"> @@ -254,8 +254,8 @@ export const Customization = (): React.ReactElement => { }} > - Control - B + Control + B diff --git a/packages/paste-core/components/keyboard-key/type-docs.json b/packages/paste-core/components/keyboard-key/type-docs.json index 8b4790f66c..2fd7a5f5b0 100644 --- a/packages/paste-core/components/keyboard-key/type-docs.json +++ b/packages/paste-core/components/keyboard-key/type-docs.json @@ -489,7 +489,7 @@ "required": false, "externalProp": true }, - "keyText": { + "keyEvent": { "type": "string", "defaultValue": "'KEYBOARD_KEY'", "required": false, @@ -2030,7 +2030,7 @@ "defaultValue": false, "required": false, "externalProp": false, - "description": "Whether the keys should show pressed state when active keys contains the keyText mapped to KeyboardKey" + "description": "Whether the keys should show pressed state when active keys contains the keyEvent mapped to KeyboardKey" }, "hidden": { "type": "boolean",