ui: wrap keyboard shortcuts in kbd tag (#421)

This commit is contained in:
Huang Xin
2025-02-21 16:43:38 +01:00
committed by GitHub
parent fcc933a243
commit e7579e5867
+8 -1
View File
@@ -43,7 +43,14 @@ const MenuItem: React.FC<MenuItemProps> = ({
</span>
</div>
{shortcut && (
<span className='text-neutral-content hidden shrink-0 text-sm sm:flex'>{shortcut}</span>
<kbd
className={clsx(
'border-base-300/40 bg-base-300/75 text-neutral-content hidden rounded-md border shadow-sm sm:flex',
'shrink-0 px-1.5 py-0.5 text-xs font-medium',
)}
>
{shortcut}
</kbd>
)}
</button>
);