// SPDX-License-Identifier: MIT // Copyright (c) 2020-2022 The Pybricks Authors import { Button, Intent, Spinner, SpinnerSize, mergeRefs, useHotkeys, } from '@blueprintjs/core'; import { Tooltip2 } from '@blueprintjs/popover2'; import React, { RefObject, useEffect, useMemo, useState } from 'react'; import { tooltipDelay } from '../app/constants'; const smallScreenThreshold = 700; export interface ActionButtonProps { /** A unique label for each instance. */ readonly label: string; /** Keyboard shortcut. */ readonly keyboardShortcut?: string; /** Tooltip text that appears when hovering over the button. */ readonly tooltip: string; /** Icon shown on the button. */ readonly icon: string; /** When true or undefined, the button is enabled. */ readonly enabled?: boolean; /** When true, show progress indicator instead of icon. */ readonly showProgress?: boolean; /** The progress value (0 to 1) or undefined for indeterminate progress. */ readonly progress?: number; /** Reference to the )} /> ); }; export default ActionButton;