mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
use consistent tooltip delay
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
|
||||
import React from 'react';
|
||||
import { tooltipDelay } from '../settings/ui';
|
||||
import { TooltipId } from './button-i18n';
|
||||
import en from './button-i18n.en.json';
|
||||
|
||||
@@ -42,7 +43,11 @@ class ActionButton extends React.Component<Props> {
|
||||
tooltipText += ` (${this.props.keyboardShortcut})`;
|
||||
}
|
||||
return (
|
||||
<Tooltip content={tooltipText} position={Position.BOTTOM}>
|
||||
<Tooltip
|
||||
content={tooltipText}
|
||||
position={Position.BOTTOM}
|
||||
hoverOpenDelay={tooltipDelay}
|
||||
>
|
||||
<Button
|
||||
ref={this.buttonRef}
|
||||
intent={Intent.PRIMARY}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { Button, Intent, Position, Tooltip } from '@blueprintjs/core';
|
||||
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
|
||||
import React from 'react';
|
||||
import { tooltipDelay } from '../settings/ui';
|
||||
import { TooltipId } from './button-i18n';
|
||||
import en from './button-i18n.en.json';
|
||||
|
||||
@@ -28,6 +29,7 @@ class LinkButton extends React.Component<Props> {
|
||||
<Tooltip
|
||||
content={this.props.i18n.translate(this.props.tooltip)}
|
||||
position={Position.BOTTOM}
|
||||
hoverOpenDelay={tooltipDelay}
|
||||
>
|
||||
<Button
|
||||
intent={Intent.PRIMARY}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Button, Intent, Position, Tooltip } from '@blueprintjs/core';
|
||||
import { WithI18nProps, withI18n } from '@shopify/react-i18n';
|
||||
import React from 'react';
|
||||
import Dropzone, { FileRejection } from 'react-dropzone';
|
||||
import { tooltipDelay } from '../settings/ui';
|
||||
import { TooltipId } from './button-i18n';
|
||||
import en from './button-i18n.en.json';
|
||||
|
||||
@@ -81,6 +82,7 @@ class OpenFileButton extends React.Component<Props> {
|
||||
<Tooltip
|
||||
content={this.props.i18n.translate(this.props.tooltip)}
|
||||
position={Position.BOTTOM}
|
||||
hoverOpenDelay={tooltipDelay}
|
||||
>
|
||||
<Button
|
||||
{...getRootProps()}
|
||||
|
||||
@@ -9,15 +9,14 @@ import { Action, Dispatch } from '../actions';
|
||||
import { closeSettings } from '../actions/app';
|
||||
import { setBoolean } from '../actions/settings';
|
||||
import { RootState } from '../reducers';
|
||||
import { SettingId } from '../settings';
|
||||
import { tooltipDelay } from '../settings/ui';
|
||||
import { SettingId } from '../settings/user';
|
||||
import { isMacOS } from '../utils/os';
|
||||
import { SettingsStringId } from './settings-i18n';
|
||||
import en from './settings-i18n.en.json';
|
||||
|
||||
import './settings.scss';
|
||||
|
||||
const tooltipDelay = 1000;
|
||||
|
||||
type StateProps = {
|
||||
open: boolean;
|
||||
showDocs: boolean;
|
||||
|
||||
Reference in New Issue
Block a user