utils: drop pointerEventsNone

Not sure why this was used in the first place, but causes non-default
behavior which can be confusing.
This commit is contained in:
David Lechner
2022-05-13 14:39:35 -05:00
parent cd88789be7
commit 7322c9d667
3 changed files with 1 additions and 10 deletions
-3
View File
@@ -12,7 +12,6 @@ import {
import { Tooltip2 } from '@blueprintjs/popover2';
import React, { useEffect, useMemo, useState } from 'react';
import { tooltipDelay } from '../app/constants';
import { pointerEventsNone } from '../utils/react';
const smallScreenThreshold = 700;
@@ -101,7 +100,6 @@ const ActionButton: React.VoidFunctionComponent<ActionButtonProps> = ({
intent={Intent.PRIMARY}
onClick={onAction}
disabled={enabled === false}
style={enabled === false ? pointerEventsNone : undefined}
>
{showProgress ? (
<Spinner
@@ -115,7 +113,6 @@ const ActionButton: React.VoidFunctionComponent<ActionButtonProps> = ({
height={`${buttonSize}px`}
src={icon}
alt={label}
style={pointerEventsNone}
/>
)}
</Button>
-3
View File
@@ -6,7 +6,6 @@ import { Tooltip2 } from '@blueprintjs/popover2';
import React, { useEffect, useState } from 'react';
import { useDropzone } from 'react-dropzone';
import { tooltipDelay } from '../app/constants';
import { pointerEventsNone } from '../utils/react';
const smallScreenThreshold = 700;
export interface OpenFileButtonProps {
@@ -115,7 +114,6 @@ const OpenFileButton: React.VoidFunctionComponent<OpenFileButtonProps> = ({
'aria-haspopup': undefined,
intent: Intent.PRIMARY,
disabled: enabled === false,
style: enabled === false ? pointerEventsNone : undefined,
onClick: onClick,
})}
>
@@ -132,7 +130,6 @@ const OpenFileButton: React.VoidFunctionComponent<OpenFileButtonProps> = ({
height={`${buttonSize}px`}
src={icon}
alt={label}
style={pointerEventsNone}
/>
)}
</Button>
+1 -4
View File
@@ -1,11 +1,8 @@
// helper functions for React components
import React, { useState } from 'react';
import { useState } from 'react';
import { createCountFunc } from './iter';
/** Style to disable pointer events. */
export const pointerEventsNone: React.CSSProperties = { pointerEvents: 'none' };
const nextId = createCountFunc();
/**