Migrate components to eslint
This commit is contained in:
parent
de66486e41
commit
b13dbcfa77
69 changed files with 875 additions and 800 deletions
|
@ -196,7 +196,7 @@ const CALLING_SHORTCUTS: Array<ShortcutType> = [
|
|||
},
|
||||
];
|
||||
|
||||
export const ShortcutGuide = (props: Props) => {
|
||||
export const ShortcutGuide = (props: Props): JSX.Element => {
|
||||
const focusRef = React.useRef<HTMLDivElement>(null);
|
||||
const { i18n, close, hasInstalledStickers, platform } = props;
|
||||
const isMacOS = platform === 'darwin';
|
||||
|
@ -211,9 +211,11 @@ export const ShortcutGuide = (props: Props) => {
|
|||
{i18n('Keyboard--header')}
|
||||
</div>
|
||||
<button
|
||||
aria-label={i18n('close-popup')}
|
||||
className="module-shortcut-guide__header-close"
|
||||
onClick={close}
|
||||
title={i18n('close-popup')}
|
||||
type="button"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
|
@ -282,17 +284,17 @@ function renderShortcut(
|
|||
i18n: LocalizerType
|
||||
) {
|
||||
return (
|
||||
<div key={index} className="module-shortcut-guide__shortcut" tabIndex={0}>
|
||||
<div key={index} className="module-shortcut-guide__shortcut">
|
||||
<div className="module-shortcut-guide__shortcut__description">
|
||||
{i18n(shortcut.description)}
|
||||
</div>
|
||||
<div className="module-shortcut-guide__shortcut__key-container">
|
||||
{shortcut.keys.map((keys, outerIndex) => (
|
||||
{shortcut.keys.map(keys => (
|
||||
<div
|
||||
key={outerIndex}
|
||||
key={`${shortcut.description}--${keys.map(k => k).join('-')}`}
|
||||
className="module-shortcut-guide__shortcut__key-inner-container"
|
||||
>
|
||||
{keys.map((key, mapIndex) => {
|
||||
{keys.map(key => {
|
||||
let label: string = key;
|
||||
let isSquare = true;
|
||||
|
||||
|
@ -334,7 +336,7 @@ function renderShortcut(
|
|||
|
||||
return (
|
||||
<span
|
||||
key={mapIndex}
|
||||
key={`shortcut__key--${key}`}
|
||||
className={classNames(
|
||||
'module-shortcut-guide__shortcut__key',
|
||||
isSquare
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue