diff --git a/src/components/actions/Link/Link.stories.tsx b/src/components/actions/Link/Link.stories.tsx index cfe244f..85ce645 100644 --- a/src/components/actions/Link/Link.stories.tsx +++ b/src/components/actions/Link/Link.stories.tsx @@ -45,7 +45,7 @@ export const Descenders: Story = { export const Scroll: Story = { render: (args) => ( <> - + { evt.preventDefault(); }}>Anchor diff --git a/src/components/containers/Alert/Alert.stories.tsx b/src/components/containers/Alert/Alert.stories.tsx index 1c1c17c..01e6b41 100644 --- a/src/components/containers/Alert/Alert.stories.tsx +++ b/src/components/containers/Alert/Alert.stories.tsx @@ -31,10 +31,10 @@ export default { export const Standard: Story = {}; -export const Info: Story = { args: { kind: 'info' } }; -export const Warning: Story = { args: { kind: 'warning' } }; -export const Error: Story = { args: { kind: 'error' } }; -export const Success: Story = { args: { kind: 'success' } }; +export const InfoAlert: Story = { args: { kind: 'info' } }; +export const WarningAlert: Story = { args: { kind: 'warning' } }; +export const ErrorAlert: Story = { args: { kind: 'error' } }; +export const SuccessAlert: Story = { args: { kind: 'success' } }; /** Multiple alerts stacked. */ export const Stacked: Story = { diff --git a/src/components/forms/context/SubmitButton/SubmitButton.tsx b/src/components/forms/context/SubmitButton/SubmitButton.tsx index 35ef7d8..3f9627f 100644 --- a/src/components/forms/context/SubmitButton/SubmitButton.tsx +++ b/src/components/forms/context/SubmitButton/SubmitButton.tsx @@ -45,13 +45,13 @@ export const SubmitButton = (props: SubmitButtonProps) => { const isDisabled = !isInteractive; const isNonactive = propsButton.nonactive || isPending; - const handlePress = () => { + const handlePress = React.useCallback(() => { if (typeof onPress !== 'function') { return; } startPressTransition(async () => { await Promise.race([onPress(), timeout(asyncTimeout)]); }); - }; + }, [onPress, asyncTimeout]); const handleClick = React.useCallback(async (event: React.MouseEvent) => { // `onClick` should not be used in most cases, only if the consumer needs low level control over click events. diff --git a/src/components/forms/controls/SegmentedControl/SegmentedControl.tsx b/src/components/forms/controls/SegmentedControl/SegmentedControl.tsx index 898f5bb..fbb961b 100644 --- a/src/components/forms/controls/SegmentedControl/SegmentedControl.tsx +++ b/src/components/forms/controls/SegmentedControl/SegmentedControl.tsx @@ -83,7 +83,8 @@ export const SegmentedControl = (props: SegmentedControlProps) => { [cl['bk-segmented-control--disabled']]: disabled, }, propsRest.className)} > - {formattedOptions.map((option, index) => + {formattedOptions.map((option, index) => + // biome-ignore lint/suspicious/noArrayIndexKey: no other unique identifier available