Skip to content

Commit

Permalink
fix breaking change in blueprintjs popover2
Browse files Browse the repository at this point in the history
  • Loading branch information
dlech committed Jan 24, 2023
1 parent 0b63027 commit 7aec8fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/toolbar/ActionButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
// Copyright (c) 2020-2022 The Pybricks Authors
// Copyright (c) 2020-2023 The Pybricks Authors

import {
Button,
Expand All @@ -9,7 +9,7 @@ import {
SpinnerSize,
useHotkeys,
} from '@blueprintjs/core';
import { Tooltip2 } from '@blueprintjs/popover2';
import { Popover2HoverTargetHandlers, Tooltip2 } from '@blueprintjs/popover2';
import { mergeProps } from '@react-aria/utils';
import classNames from 'classnames';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
Expand Down Expand Up @@ -110,7 +110,8 @@ const ActionButton: React.VoidFunctionComponent<ActionButtonProps> = ({
aria-disabled={enabled === false}
aria-label={label}
elementRef={tooltipTargetRef as React.Ref<HTMLButtonElement>}
{...mergeProps(tooltipTargetProps, {
// https://github.com/palantir/blueprint/issues/5889
{...mergeProps(tooltipTargetProps as Popover2HoverTargetHandlers, {
className: classNames(
'pb-toolbar-action-button',
enabled === false && Classes.DISABLED,
Expand Down

0 comments on commit 7aec8fb

Please sign in to comment.