mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
replace use of deprecated IRef
This commit is contained in:
@@ -11,7 +11,6 @@ import {
|
||||
ControlGroup,
|
||||
DialogStep,
|
||||
FormGroup,
|
||||
IRef,
|
||||
Icon,
|
||||
InputGroup,
|
||||
Intent,
|
||||
@@ -129,7 +128,7 @@ const SelectHubPanel: React.VoidFunctionComponent = () => {
|
||||
}
|
||||
renderTarget={({ isOpen: _isOpen, ref, ...targetProps }) => (
|
||||
<Button
|
||||
elementRef={ref as IRef<HTMLButtonElement>}
|
||||
elementRef={ref as React.Ref<HTMLButtonElement>}
|
||||
{...targetProps}
|
||||
>
|
||||
{i18n.translate('selectHubPanel.notOnListButton.label')}
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2020-2022 The Pybricks Authors
|
||||
|
||||
import {
|
||||
Button,
|
||||
IRef,
|
||||
Intent,
|
||||
Spinner,
|
||||
SpinnerSize,
|
||||
useHotkeys,
|
||||
} from '@blueprintjs/core';
|
||||
import { Button, Intent, Spinner, SpinnerSize, useHotkeys } from '@blueprintjs/core';
|
||||
import { Tooltip2 } from '@blueprintjs/popover2';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { tooltipDelay } from '../app/constants';
|
||||
@@ -100,7 +93,7 @@ const ActionButton: React.VoidFunctionComponent<ActionButtonProps> = ({
|
||||
<Button
|
||||
id={id}
|
||||
aria-label={label}
|
||||
elementRef={tooltipTargetRef as IRef<HTMLButtonElement>}
|
||||
elementRef={tooltipTargetRef as React.Ref<HTMLButtonElement>}
|
||||
{...tooltipTargetProps}
|
||||
// https://github.com/palantir/blueprint/pull/5300
|
||||
aria-haspopup={undefined}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2020-2022 The Pybricks Authors
|
||||
|
||||
import { Button, IRef, Intent, Spinner, SpinnerSize } from '@blueprintjs/core';
|
||||
import { Button, Intent, Spinner, SpinnerSize } from '@blueprintjs/core';
|
||||
import { Tooltip2 } from '@blueprintjs/popover2';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useDropzone } from 'react-dropzone';
|
||||
@@ -116,7 +116,7 @@ const OpenFileButton: React.VoidFunctionComponent<OpenFileButtonProps> = ({
|
||||
id,
|
||||
'aria-label': label,
|
||||
refKey: 'elementRef',
|
||||
elementRef: tooltipTargetRef as IRef<HTMLButtonElement>,
|
||||
elementRef: tooltipTargetRef as React.Ref<HTMLButtonElement>,
|
||||
...tooltipTargetProps,
|
||||
// https://github.com/palantir/blueprint/pull/5300
|
||||
'aria-haspopup': undefined,
|
||||
|
||||
Reference in New Issue
Block a user