mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
feat: add fn win alt keys (#4638)
* feat: add new keys * feat: add new keys * chore: update docs & storybook as well --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com>
This commit is contained in:
parent
69aa4769c0
commit
8452603b5b
5
.changeset/stale-tips-kneel.md
Normal file
5
.changeset/stale-tips-kneel.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@heroui/kbd": patch
|
||||
---
|
||||
|
||||
Add fn win alt keys (#4499)
|
||||
@ -112,5 +112,8 @@ type KbdKey =
|
||||
| "home"
|
||||
| "end"
|
||||
| "help"
|
||||
| "space";
|
||||
| "space"
|
||||
| "fn"
|
||||
| "win"
|
||||
| "alt";
|
||||
```
|
||||
|
||||
@ -17,7 +17,10 @@ export type KbdKey =
|
||||
| "home"
|
||||
| "end"
|
||||
| "help"
|
||||
| "space";
|
||||
| "space"
|
||||
| "fn"
|
||||
| "win"
|
||||
| "alt";
|
||||
|
||||
export const kbdKeysMap: Record<KbdKey, string> = {
|
||||
command: "⌘",
|
||||
@ -39,6 +42,9 @@ export const kbdKeysMap: Record<KbdKey, string> = {
|
||||
end: "↘",
|
||||
help: "?",
|
||||
space: "␣",
|
||||
fn: "Fn",
|
||||
win: "⌘",
|
||||
alt: "⌥",
|
||||
};
|
||||
|
||||
export const kbdKeysLabelMap: Record<KbdKey, string> = {
|
||||
@ -61,6 +67,9 @@ export const kbdKeysLabelMap: Record<KbdKey, string> = {
|
||||
end: "End",
|
||||
help: "Help",
|
||||
space: "Space",
|
||||
fn: "Fn",
|
||||
win: "Win",
|
||||
alt: "Alt",
|
||||
};
|
||||
|
||||
export type KbdKeysLabelType = typeof kbdKeysLabelMap;
|
||||
|
||||
@ -31,6 +31,9 @@ export default {
|
||||
"end",
|
||||
"help",
|
||||
"space",
|
||||
"fn",
|
||||
"win",
|
||||
"alt",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user