refactor: Converting span to kbd tag (#2774)
This commit is contained in:
parent
04c46fc01a
commit
511eb62228
@ -54,6 +54,7 @@
|
|||||||
.context-menu-option__shortcut {
|
.context-menu-option__shortcut {
|
||||||
justify-self: end;
|
justify-self: end;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
|
font-family: inherit;
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,11 +52,11 @@ const ContextMenu = ({ options, onCloseRequest, top, left }: Props) => {
|
|||||||
onClick={action}
|
onClick={action}
|
||||||
>
|
>
|
||||||
<div className="context-menu-option__label">{label}</div>
|
<div className="context-menu-option__label">{label}</div>
|
||||||
<div className="context-menu-option__shortcut">
|
<kbd className="context-menu-option__shortcut">
|
||||||
{shortcutName
|
{shortcutName
|
||||||
? getShortcutFromShortcutName(shortcutName)
|
? getShortcutFromShortcutName(shortcutName)
|
||||||
: ""}
|
: ""}
|
||||||
</div>
|
</kbd>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ShortcutsDialog-footer {
|
.ShortcutsDialog-footer {
|
||||||
|
@ -82,7 +82,7 @@ Shortcut.defaultProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const ShortcutKey = (props: { children: React.ReactNode }) => (
|
const ShortcutKey = (props: { children: React.ReactNode }) => (
|
||||||
<span className="ShorcutsDialog-key" {...props} />
|
<kbd className="ShorcutsDialog-key" {...props} />
|
||||||
);
|
);
|
||||||
|
|
||||||
const Footer = () => (
|
const Footer = () => (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user