Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Button): add autoFocus property #1988

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: correct href
GermanVor committed Dec 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit bbd6d977697a0bd2b12360c0f016d078540fa33d
3 changes: 1 addition & 2 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -2,8 +2,7 @@

import React from 'react';

import {useForkRef} from 'src/hooks';

import {useForkRef} from '../../hooks';
import type {DOMProps, QAProps} from '../types';
import {block} from '../utils/cn';
import {isIcon, isSvg} from '../utils/common';

Unchanged files with check annotations Beta

const [{theme}] = useGlobals();
React.useEffect(() => {
api.setOptions({theme: themes[getThemeType(theme)]});
}, [theme]);

Check warning on line 26 in .storybook/theme-addon/register.tsx

GitHub Actions / Verify Files

React Hook React.useEffect has a missing dependency: 'api'. Either include it or remove the dependency array
return null;
}
React.useEffect(() => window.clearTimeout(timerIdRef.current), []);
const handleCopy: OnCopyHandler = React.useCallback(
(text, result) => {

Check warning on line 119 in src/components/ClipboardButton/ClipboardButton.tsx

GitHub Actions / Verify Files

'text' is already declared in the upper scope on line 102 column 9
onCopy?.(text, result);
setTooltipDisabled(false);
setTooltipCloseDelay(timeout);
expect(() =>
render(
<CopyToClipboard text="Text to copy" onCopy={onCopy}>
{(() => 123) as any as CopyToClipboardContent}

Check warning on line 13 in src/components/CopyToClipboard/__tests__/CopyToClipboard.test.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
</CopyToClipboard>,
),
).toThrow('Content must be a valid react element');
}
function getKeyId(defs: PlatformDefs, val: string): string {
val = val.toLowerCase();

Check warning on line 34 in src/components/Hotkey/parse.ts

GitHub Actions / Verify Files

Assignment to function parameter 'val'
return defs.NormalizeMap[val] ?? val;
}
export const isMac = (): boolean =>
typeof navigator !== 'undefined' ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : false;

Check warning on line 2 in src/components/Hotkey/utils.ts

GitHub Actions / Verify Files

Unexpected negated condition
export function split(val: string, separator: string | RegExp): string[] {
return val.trim().split(separator).filter(Boolean);
};
refFilter = React.createRef<HTMLInputElement>();
refContainer = React.createRef<any>();

Check warning on line 104 in src/components/List/List.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
blurTimer: ReturnType<typeof setTimeout> | null = null;
loadingItem = {value: '__LIST_ITEM_LOADING__', disabled: false} as unknown as ListItemData<
T & {value: string}
} as Meta<typeof ListItem>;
const getComponentTemplate = <
T extends React.JSXElementConstructor<ListItemProps<any>> = typeof ListItem,

Check warning on line 80 in src/components/List/__stories__/ListItem.stories.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
>(): StoryFn<T> =>
// eslint-disable-next-line react/display-name
((args: any) => <ListItem {...args} />) as any;

Check warning on line 83 in src/components/List/__stories__/ListItem.stories.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type

Check warning on line 83 in src/components/List/__stories__/ListItem.stories.tsx

GitHub Actions / Verify Files

Unexpected any. Specify a different type
const Template = getComponentTemplate();
function getRefs(count: number) {
return _range(count).reduce((acc, index) => {
acc[index] = React.createRef();

Check warning on line 24 in src/components/List/components/SimpleContainer.tsx

GitHub Actions / Verify Files

Assignment to property of function parameter 'acc'
return acc;
}, {} as RefsList);
}