refactor: Converting span to kbd tag (#2774)

This commit is contained in:
Rafi 2021-01-14 12:54:32 +05:30 committed by GitHub
parent 04c46fc01a
commit 511eb62228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View File

@ -54,6 +54,7 @@
.context-menu-option__shortcut {
justify-self: end;
opacity: 0.6;
font-family: inherit;
font-size: 0.7rem;
}
}

View File

@ -52,11 +52,11 @@ const ContextMenu = ({ options, onCloseRequest, top, left }: Props) => {
onClick={action}
>
<div className="context-menu-option__label">{label}</div>
<div className="context-menu-option__shortcut">
<kbd className="context-menu-option__shortcut">
{shortcutName
? getShortcutFromShortcutName(shortcutName)
: ""}
</div>
</kbd>
</button>
</li>
))}

View File

@ -29,6 +29,7 @@
box-sizing: border-box;
display: flex;
align-items: center;
font-family: inherit;
}
.ShortcutsDialog-footer {

View File

@ -82,7 +82,7 @@ Shortcut.defaultProps = {
};
const ShortcutKey = (props: { children: React.ReactNode }) => (
<span className="ShorcutsDialog-key" {...props} />
<kbd className="ShorcutsDialog-key" {...props} />
);
const Footer = () => (